Class HiOrgServerProfileDefinition
- java.lang.Object
-
- org.pac4j.core.profile.definition.ProfileDefinition
-
- org.pac4j.core.profile.definition.CommonProfileDefinition
-
- org.pac4j.oauth.profile.definition.OAuthProfileDefinition
-
- org.pac4j.oauth.profile.hiorgserver.HiOrgServerProfileDefinition
-
public class HiOrgServerProfileDefinition extends OAuthProfileDefinition
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 java.lang.StringALTERNATIVE_IDprotected static java.lang.StringBASE_URLstatic java.lang.StringFIRST_NAMEstatic java.lang.StringFULL_NAMEstatic java.lang.StringLEADERstatic java.lang.StringNAMEstatic java.lang.StringORGANISATION_IDstatic java.lang.StringORGANISATION_NAMEstatic java.lang.StringPOSITIONstatic java.lang.StringROLESstatic java.lang.StringTYPED_ALTERNATIVE_IDstatic java.lang.StringUSER_IDstatic java.lang.StringUSERNAME
-
Constructor Summary
Constructors Constructor Description HiOrgServerProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidextractRoles(HiOrgServerProfile profile)HiOrgServerProfileextractUserProfile(java.lang.String body)Extract the user profile from the response (JSON, XML...) of the profile url.java.lang.StringgetProfileUrl(com.github.scribejava.core.model.Token accessToken, OAuthConfiguration 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, getParameter, getPrimaryAttributes, getProfileId, getSecondaryAttributes, isRestoreProfileFromTypedId, newProfile, primary, secondary, setProfileFactory, setProfileId, setRestoreProfileFromTypedId
-
-
-
-
Field Detail
-
USER_ID
public static final java.lang.String USER_ID
- See Also:
- Constant Field Values
-
USERNAME
public static final java.lang.String USERNAME
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
FIRST_NAME
public static final java.lang.String FIRST_NAME
- See Also:
- Constant Field Values
-
FULL_NAME
public static final java.lang.String FULL_NAME
- See Also:
- Constant Field Values
-
ROLES
public static final java.lang.String ROLES
- See Also:
- Constant Field Values
-
LEADER
public static final java.lang.String LEADER
- See Also:
- Constant Field Values
-
POSITION
public static final java.lang.String POSITION
- See Also:
- Constant Field Values
-
ORGANISATION_ID
public static final java.lang.String ORGANISATION_ID
- See Also:
- Constant Field Values
-
ORGANISATION_NAME
public static final java.lang.String ORGANISATION_NAME
- See Also:
- Constant Field Values
-
ALTERNATIVE_ID
public static final java.lang.String ALTERNATIVE_ID
- See Also:
- Constant Field Values
-
TYPED_ALTERNATIVE_ID
public static final java.lang.String TYPED_ALTERNATIVE_ID
- See Also:
- Constant Field Values
-
BASE_URL
protected static final java.lang.String BASE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProfileUrl
public java.lang.String getProfileUrl(com.github.scribejava.core.model.Token accessToken, OAuthConfiguration configuration)Description copied from class:OAuthProfileDefinitionRetrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrlin classOAuthProfileDefinition- 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(java.lang.String body)
Description copied from class:OAuthProfileDefinitionExtract the user profile from the response (JSON, XML...) of the profile url.- Specified by:
extractUserProfilein classOAuthProfileDefinition- Parameters:
body- the response body- Returns:
- the returned profile
-
extractRoles
protected void extractRoles(HiOrgServerProfile profile)
-
-