C# Class NSwag.CodeGeneration.SwaggerGenerators.WebApi.Processors.Security.OperationSecurityScopeProcessor

Generates the OAuth2 security scopes for an operation by reflecting the AuthorizeAttribute attributes.
Inheritance: IOperationProcessor
Exibir arquivo Open project: NSwag/NSwag

Public Methods

Method Description
OperationSecurityScopeProcessor ( string name ) : System.Collections.Generic

Initializes a new instance of the OperationSecurityScopeProcessor class.

Process ( OperationProcessorContext context ) : bool

Processes the specified method information.

Protected Methods

Method Description
GetScopes ( SwaggerOperationDescription operationDescription, MethodInfo methodInfo ) : IEnumerable

Gets the security scopes for an operation.

Method Details

GetScopes() protected method

Gets the security scopes for an operation.
protected GetScopes ( SwaggerOperationDescription operationDescription, MethodInfo methodInfo ) : IEnumerable
operationDescription SwaggerOperationDescription The operation description.
methodInfo System.Reflection.MethodInfo The method information.
return IEnumerable

OperationSecurityScopeProcessor() public method

Initializes a new instance of the OperationSecurityScopeProcessor class.
public OperationSecurityScopeProcessor ( string name ) : System.Collections.Generic
name string The security definition name.
return System.Collections.Generic

Process() public method

Processes the specified method information.
public Process ( OperationProcessorContext context ) : bool
context OperationProcessorContext
return bool