# IAuthOptions Decorator

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

# Overview

interface IAuthOptions {
    responses?: {
        [statusCode: string]: {
            description: string;
        };
    };
    security?: {
        [securityName: string]: string[];
    }[];
    [key: string]: any;
}
/**
 * Change authentication options.
 *
 * ```typescript
 * @Controller('/mypath')
 * @UseAuth(MyAuthStrategy, {role: ''})
 * class MyCtrl {
 *
 *   @Get('/')
 *   @AuthOptions(MyAuthStrategy, {role: 'admin'})
 *   public getResource(){}
 * }
 * ```
 *
 * @param guardAuth
 * @param options {Object} Object passed to the customer auth strategy
 * @returns {Function}
 * @decorator
 * @endpoint
 */