# Decorator Security

Decorator swagger schema classDecorator operation private
Module
import { Security } from "@tsed/specs/schema/src/decorators/operations/security"
Source/packages/specs/schema/src/decorators/operations/security.ts

# Overview

function Security(name: string, ...scopes: string[]): (...args: any[]) => any;

# Description

Add security metadata on the decorated method.

# Examples

# On method

@Controller("/")
class ModelCtrl {
   @Security("write:calendars")
   async method() {}
}
1
2
3
4
5

Other topics