# Security Decorator

Module
import { Security } from "@tsed/swagger/src/decorators/security"
Source/packages/swagger/src/decorators/security.ts

# Overview

function Security(securityDefinitionName: string, ...scopes: string[]): Function;

# Description

Add security metadata on the decorated method.

# Examples

# On method

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