# AuthOptions Decorator operation

Module
import { AuthOptions } from "@tsed/common"
Source/packages/common/src/mvc/decorators/method/authOptions.ts

# Overview

function AuthOptions(guardAuth: Type<any>, options?: IAuthOptions): Function;
Param Type Description
options Object Optional. Object passed to the customer auth strategy

# Description

Change authentication options.

@Controller('/mypath')
@UseAuth(MyAuthStrategy, {role: ''})
class MyCtrl {

  @Get('/')
  @AuthOptions(MyAuthStrategy, {role: 'admin'})
  public getResource(){}
}
1
2
3
4
5
6
7
8