Annotation Type SecurityRequirement
-
@Target({METHOD,TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Repeatable(SecurityRequirements.class) @Inherited public @interface SecurityRequirement
The annotation may be applied at class or method level, or inOperation.security()
()} to define security requirements for the single operation (when applied at method level) or for all operations of a class (when applied at class level).It can also be used in
OpenAPIDefinition.security()
to define spec level security.
-
-
Element Detail
-
name
String name
This name must correspond to a declared SecurityRequirement.- Returns:
- String name
-
-
-
scopes
String[] scopes
If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array must be empty.- Returns:
- String array of scopes
- Default:
- {}
-
-