Class BearerTokenAuthenticationExtractor
java.lang.Object
org.springframework.graphql.server.support.BearerTokenAuthenticationExtractor
- All Implemented Interfaces:
- AuthenticationExtractor
public final class BearerTokenAuthenticationExtractor
extends Object
implements AuthenticationExtractor
AuthenticationExtractor that extracts a
 bearer token.- Since:
- 1.3.0
- Author:
- Joshua Cummings, Rossen Stoyanchev
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringDefault key to access Authorization value inconnection_initpayload.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor that defaults toAUTHORIZATION_KEYfor the payload key.BearerTokenAuthenticationExtractor(String authorizationKey) Constructor with the key for the authorization value.
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Mono<org.springframework.security.core.Authentication> getAuthentication(Map<String, Object> payload) Return the authentication contained in the given payload, or an emptyMono.
- 
Field Details- 
AUTHORIZATION_KEYDefault key to access Authorization value inconnection_initpayload.- See Also:
 
 
- 
- 
Constructor Details- 
BearerTokenAuthenticationExtractorpublic BearerTokenAuthenticationExtractor()Constructor that defaults toAUTHORIZATION_KEYfor the payload key.
- 
BearerTokenAuthenticationExtractorConstructor with the key for the authorization value.- Parameters:
- authorizationKey- the key under which to look up the authorization value in the- "connection_init"payload.
 
 
- 
- 
Method Details- 
getAuthenticationpublic reactor.core.publisher.Mono<org.springframework.security.core.Authentication> getAuthentication(Map<String, Object> payload) Description copied from interface:AuthenticationExtractorReturn the authentication contained in the given payload, or an emptyMono.- Specified by:
- getAuthenticationin interface- AuthenticationExtractor
- Parameters:
- payload- the payload to extract the authentication value from
 
 
-