Class OAuth20CredentialsExtractor

java.lang.Object
org.pac4j.oauth.credentials.extractor.OAuth20CredentialsExtractor
All Implemented Interfaces:
org.pac4j.core.credentials.extractor.CredentialsExtractor

public class OAuth20CredentialsExtractor extends Object
OAuth 2.0 credentials extractor.
Since:
2.0.0
Author:
Jerome Leleu
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
    • configuration

      protected OAuthConfiguration configuration
    • client

      protected org.pac4j.core.client.IndirectClient client
  • Constructor Details

    • OAuth20CredentialsExtractor

      public OAuth20CredentialsExtractor(OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client)

      Constructor for OAuth20CredentialsExtractor.

      Parameters:
      configuration - a OAuth20Configuration object
      client - a IndirectClient object
  • Method Details

    • getOAuthCredentials

      protected Optional<org.pac4j.core.credentials.Credentials> getOAuthCredentials(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)
      Get the OAuth credentials from the web context.
      Parameters:
      context - the web context
      sessionStore - the session store
      Returns:
      the OAuth credentials
    • extract

      public Optional<org.pac4j.core.credentials.Credentials> extract(org.pac4j.core.context.CallContext ctx)
      Specified by:
      extract in interface org.pac4j.core.credentials.extractor.CredentialsExtractor