Top Description Methods
org.eclipse.microprofile.openapi.annotations.security

public @Interface SecurityRequirementsSet

extends Annotation
Annotations
@Target:METHOD, TYPE
@Retention:RUNTIME
@Repeatable:SecurityRequirementsSets
@Inherited
Imports
java.lang.annotation.ElementType, .Inherited, .Repeatable, .Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition

This annotation represents a set of security requirements which permit access to an operation if all of them are satisfied.

If this annotation is applied to a method which corresponds to an operation, then the requirements will be added to that operation.

If this annotation is applied to a class which contains methods which correspond to operations, then the requirements will be added to all operations corresponding to methods within that class which don't specify any other requirements.

Security requirements can be specified for the whole API using OpenAPIDefinition#securitySets(). Security requirements specified for individual operations override those specified for the whole API.

If multiple security requirement sets are specified for an operation, then a user must satisfy all of the requirements within any one of the sets to access the operation.

An empty security requirement set indicates that authentication is not required.

A SecurityRequirementSet annotation corresponds to a map of security requirements in an OpenAPI document.

Example:
security:
 - api_secret: []
   oauth_implicit: []
See Also
OpenAPI Specification Security Requirement Object

Method Summary

Modifier and TypeMethod and Description
public SecurityRequirement[]

Returns:

the array of the SecurityRequirement annotations, may be empty
value
()

The security requirements which make up the set

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public SecurityRequirement[] value()

The security requirements which make up the set

Returns:SecurityRequirement[]

the array of the SecurityRequirement annotations, may be empty