Class HiOrgServerProfileDefinition
- java.lang.Object
-
- org.pac4j.core.profile.definition.ProfileDefinition<P>
-
- org.pac4j.core.profile.definition.CommonProfileDefinition<P>
-
- org.pac4j.oauth.profile.definition.OAuthProfileDefinition<P,com.github.scribejava.core.model.OAuth2AccessToken,C>
-
- org.pac4j.oauth.profile.definition.OAuth20ProfileDefinition<HiOrgServerProfile,HiOrgServerConfiguration>
-
- org.pac4j.oauth.profile.hiorgserver.HiOrgServerProfileDefinition
-
public class HiOrgServerProfileDefinition extends OAuth20ProfileDefinition<HiOrgServerProfile,HiOrgServerConfiguration>
This class is the HiOrg-Server profile definition.- Since:
- 3.2.0
- Author:
- Martin Böhmer
-
-
Field Summary
Fields Modifier and Type Field Description static StringALTERNATIVE_IDprotected static StringBASE_URLstatic StringFIRST_NAMEstatic StringFULL_NAMEstatic StringLEADERstatic StringNAMEstatic StringORGANISATION_IDstatic StringORGANISATION_NAMEstatic StringPOSITIONstatic StringROLESstatic StringTYPED_ALTERNATIVE_IDstatic StringUSER_IDstatic StringUSERNAME-
Fields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
DISPLAY_NAME, EMAIL, FAMILY_NAME, GENDER, LOCALE, LOCATION, PICTURE_URL, PROFILE_URL
-
Fields inherited from class org.pac4j.core.profile.definition.ProfileDefinition
logger, newProfile
-
-
Constructor Summary
Constructors Constructor Description HiOrgServerProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidextractRoles(HiOrgServerProfile profile)HiOrgServerProfileextractUserProfile(String body)Extract the user profile from the response (JSON, XML...) of the profile url.StringgetProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, HiOrgServerConfiguration configuration)Retrieve the url of the profile of the authenticated user for the provider.-
Methods inherited from class org.pac4j.oauth.profile.definition.OAuthProfileDefinition
getProfileVerb, raiseProfileExtractionError, raiseProfileExtractionJsonError, raiseProfileExtractionJsonError
-
Methods inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
configurePrimaryAttributes
-
Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinition
convertAndAdd, convertAndAdd, getConverters, getPrimaryAttributes, getProfileId, getSecondaryAttributes, newProfile, primary, secondary, setProfileFactory, setProfileId
-
-
-
-
Field Detail
-
USER_ID
public static final String USER_ID
- See Also:
- Constant Field Values
-
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
FIRST_NAME
public static final String FIRST_NAME
- See Also:
- Constant Field Values
-
FULL_NAME
public static final String FULL_NAME
- See Also:
- Constant Field Values
-
ROLES
public static final String ROLES
- See Also:
- Constant Field Values
-
LEADER
public static final String LEADER
- See Also:
- Constant Field Values
-
POSITION
public static final String POSITION
- See Also:
- Constant Field Values
-
ORGANISATION_ID
public static final String ORGANISATION_ID
- See Also:
- Constant Field Values
-
ORGANISATION_NAME
public static final String ORGANISATION_NAME
- See Also:
- Constant Field Values
-
ALTERNATIVE_ID
public static final String ALTERNATIVE_ID
- See Also:
- Constant Field Values
-
TYPED_ALTERNATIVE_ID
public static final String TYPED_ALTERNATIVE_ID
- See Also:
- Constant Field Values
-
BASE_URL
protected static final String BASE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProfileUrl
public String getProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, HiOrgServerConfiguration configuration)
Description copied from class:OAuthProfileDefinitionRetrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrlin classOAuthProfileDefinition<HiOrgServerProfile,com.github.scribejava.core.model.OAuth2AccessToken,HiOrgServerConfiguration>- Parameters:
accessToken- only used when constructing dynamic urls from data in the tokenconfiguration- the current configuration- Returns:
- the url of the user profile given by the provider
-
extractUserProfile
public HiOrgServerProfile extractUserProfile(String body)
Description copied from class:OAuthProfileDefinitionExtract the user profile from the response (JSON, XML...) of the profile url.- Specified by:
extractUserProfilein classOAuthProfileDefinition<HiOrgServerProfile,com.github.scribejava.core.model.OAuth2AccessToken,HiOrgServerConfiguration>- Parameters:
body- the response body- Returns:
- the returned profile
-
extractRoles
protected void extractRoles(HiOrgServerProfile profile)
-
-