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
This class is the HiOrg-Server profile definition.
- Since:
- 3.2.0
- Author:
- Martin Böhmer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstantALTERNATIVE_ID="alt_user_id"protected static final StringConstantBASE_URL="https://www.hiorg-server.de/api/oauth2/"{trunked}static final StringConstantFIRST_NAME="vorname"static final StringConstantFULL_NAME="fullname"static final StringConstantLEADER="leitung"static final StringConstantNAME="name"static final StringConstantORGANISATION_ID="orga"static final StringConstantORGANISATION_NAME="organisation"static final StringConstantPOSITION="funktion"static final StringConstantROLES="gruppe"static final StringConstantTYPED_ALTERNATIVE_ID="typed_alt_user_id"static final StringConstantUSER_ID="user_id"static final StringConstantUSERNAME="username"Fields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
DISPLAY_NAME, EMAIL, FAMILY_NAME, GENDER, LOCALE, LOCATION, PICTURE_URL, PROFILE_URLFields inherited from class org.pac4j.core.profile.definition.ProfileDefinition
logger -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for HiOrgServerProfileDefinition. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidextractRoles(HiOrgServerProfile profile) extractRoles.extractUserProfile(String body) Extract the user profile from the response (JSON, XML...) of the profile url.getProfileUrl(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, raiseProfileExtractionJsonErrorMethods inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
configurePrimaryAttributesMethods inherited from class org.pac4j.core.profile.definition.ProfileDefinition
convertAndAdd, convertAndAdd, getConverters, getLogger, getParameter, getPrimaryAttributes, getProfileFactory, getProfileId, getSecondaryAttributes, isRestoreProfileFromTypedId, newProfile, primary, secondary, setProfileFactory, setProfileId, setRestoreProfileFromTypedId
-
Field Details
-
USER_ID
ConstantUSER_ID="user_id"- See Also:
-
USERNAME
ConstantUSERNAME="username"- See Also:
-
NAME
ConstantNAME="name"- See Also:
-
FIRST_NAME
ConstantFIRST_NAME="vorname"- See Also:
-
FULL_NAME
ConstantFULL_NAME="fullname"- See Also:
-
ROLES
ConstantROLES="gruppe"- See Also:
-
LEADER
ConstantLEADER="leitung"- See Also:
-
POSITION
ConstantPOSITION="funktion"- See Also:
-
ORGANISATION_ID
ConstantORGANISATION_ID="orga"- See Also:
-
ORGANISATION_NAME
ConstantORGANISATION_NAME="organisation"- See Also:
-
ALTERNATIVE_ID
ConstantALTERNATIVE_ID="alt_user_id"- See Also:
-
TYPED_ALTERNATIVE_ID
ConstantTYPED_ALTERNATIVE_ID="typed_alt_user_id"- See Also:
-
BASE_URL
ConstantBASE_URL="https://www.hiorg-server.de/api/oauth2/"{trunked}- See Also:
-
-
Constructor Details
-
HiOrgServerProfileDefinition
public HiOrgServerProfileDefinition()Constructor for HiOrgServerProfileDefinition.
-
-
Method Details
-
getProfileUrl
public String getProfileUrl(com.github.scribejava.core.model.Token accessToken, OAuthConfiguration configuration) Retrieve 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
Extract 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
extractRoles.
- Parameters:
profile- aHiOrgServerProfileobject
-