Class BearerTokenAuthenticationExtractor

java.lang.Object
org.springframework.graphql.server.support.BearerTokenAuthenticationExtractor
All Implemented Interfaces:
AuthenticationExtractor

public final class BearerTokenAuthenticationExtractor extends Object implements AuthenticationExtractor
Since:
1.3.0
Author:
Joshua Cummings, Rossen Stoyanchev
  • Field Details

    • AUTHORIZATION_KEY

      public static final String AUTHORIZATION_KEY
      Default key to access Authorization value in connection_init payload.
      See Also:
  • Constructor Details

    • BearerTokenAuthenticationExtractor

      public BearerTokenAuthenticationExtractor()
      Constructor that defaults to AUTHORIZATION_KEY for the payload key.
    • BearerTokenAuthenticationExtractor

      public BearerTokenAuthenticationExtractor(String authorizationKey)
      Constructor 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

    • getAuthentication

      public reactor.core.publisher.Mono<org.springframework.security.core.Authentication> getAuthentication(Map<String,Object> payload)
      Description copied from interface: AuthenticationExtractor
      Return the authentication contained in the given payload, or an empty Mono.
      Specified by:
      getAuthentication in interface AuthenticationExtractor
      Parameters:
      payload - the payload to extract the authentication value from