Class ExtendedGenericOAuth20ProfileCreator

java.lang.Object
org.pac4j.oauth.profile.creator.OAuth20ProfileCreator
de.xima.fc.security.pac4j.oauth2.ExtendedGenericOAuth20ProfileCreator
All Implemented Interfaces:
org.pac4j.core.profile.creator.ProfileCreator

public class ExtendedGenericOAuth20ProfileCreator extends org.pac4j.oauth.profile.creator.OAuth20ProfileCreator
Extended profile creator for OAuth2 that adds additional attributes to the profile and silences an annoying info log message.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.pac4j.core.client.IndirectClient
     
    protected org.pac4j.oauth.config.OAuthConfiguration
     
    protected final org.slf4j.Logger
     
    protected static final com.fasterxml.jackson.databind.ObjectMapper
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExtendedGenericOAuth20ProfileCreator(org.pac4j.oauth.config.OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addTokenToProfile(org.pac4j.core.profile.UserProfile profile, com.github.scribejava.core.model.Token token)
    Add the token to the profile.
    Optional<org.pac4j.core.profile.UserProfile>
    create(org.pac4j.core.credentials.Credentials arg0, org.pac4j.core.context.WebContext arg1, org.pac4j.core.context.session.SessionStore arg2)
     
    protected com.github.scribejava.core.model.OAuthRequest
    createOAuthRequest(String arg0, com.github.scribejava.core.model.Verb arg1)
     
    protected Optional<org.pac4j.core.profile.UserProfile>
    retrieveUserProfileFromToken(org.pac4j.core.context.WebContext context, com.github.scribejava.core.model.Token accessToken)
    Retrieve the user profile from the access token.
    protected String
    sendRequestForData(com.github.scribejava.core.oauth.OAuthService arg0, com.github.scribejava.core.model.Token arg1, String arg2, com.github.scribejava.core.model.Verb arg3)
     

    Methods inherited from class org.pac4j.oauth.profile.creator.OAuth20ProfileCreator

    getAccessToken, signRequest

    Methods inherited from class Object

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

    • logger

      protected final org.slf4j.Logger logger
    • mapper

      protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
    • configuration

      protected org.pac4j.oauth.config.OAuthConfiguration configuration
    • client

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

    • ExtendedGenericOAuth20ProfileCreator

      public ExtendedGenericOAuth20ProfileCreator(org.pac4j.oauth.config.OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client)
  • Method Details

    • addTokenToProfile

      protected void addTokenToProfile(org.pac4j.core.profile.UserProfile profile, com.github.scribejava.core.model.Token token)
      Add the token to the profile.
      Overrides:
      addTokenToProfile in class org.pac4j.oauth.profile.creator.OAuth20ProfileCreator
      Parameters:
      profile - the user profile
      token - the token
    • retrieveUserProfileFromToken

      protected Optional<org.pac4j.core.profile.UserProfile> retrieveUserProfileFromToken(org.pac4j.core.context.WebContext context, com.github.scribejava.core.model.Token accessToken)
      Retrieve the user profile from the access token.
      Parameters:
      context - the web context
      accessToken - the access token
      Returns:
      the user profile
    • create

      public Optional<org.pac4j.core.profile.UserProfile> create(org.pac4j.core.credentials.Credentials arg0, org.pac4j.core.context.WebContext arg1, org.pac4j.core.context.session.SessionStore arg2)
      Specified by:
      create in interface org.pac4j.core.profile.creator.ProfileCreator
    • sendRequestForData

      protected String sendRequestForData(com.github.scribejava.core.oauth.OAuthService arg0, com.github.scribejava.core.model.Token arg1, String arg2, com.github.scribejava.core.model.Verb arg3)
    • createOAuthRequest

      protected com.github.scribejava.core.model.OAuthRequest createOAuthRequest(String arg0, com.github.scribejava.core.model.Verb arg1)