Class OAuth20CredentialsExtractor

  • All Implemented Interfaces:
    org.pac4j.core.credentials.extractor.CredentialsExtractor

    public class OAuth20CredentialsExtractor
    extends java.lang.Object
    OAuth 2.0 credentials extractor.
    Since:
    2.0.0
    Author:
    Jerome Leleu
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<org.pac4j.core.credentials.Credentials> extract​(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore)  
      protected java.util.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
      • client

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

      • OAuth20CredentialsExtractor

        public OAuth20CredentialsExtractor​(OAuth20Configuration configuration,
                                           org.pac4j.core.client.IndirectClient client)
    • Method Detail

      • getOAuthCredentials

        protected java.util.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 java.util.Optional<org.pac4j.core.credentials.Credentials> extract​(org.pac4j.core.context.WebContext context,
                                                                                  org.pac4j.core.context.session.SessionStore sessionStore)
        Specified by:
        extract in interface org.pac4j.core.credentials.extractor.CredentialsExtractor