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
Modifier and TypeFieldDescriptionstatic final String
ConstantALTERNATIVE_ID="alt_user_id"
protected static final String
ConstantBASE_URL="https://www.hiorg-server.de/api/oauth2/"{trunked}
static final String
ConstantFIRST_NAME="vorname"
static final String
ConstantFULL_NAME="fullname"
static final String
ConstantLEADER="leitung"
static final String
ConstantNAME="name"
static final String
ConstantORGANISATION_ID="orga"
static final String
ConstantORGANISATION_NAME="organisation"
static final String
ConstantPOSITION="funktion"
static final String
ConstantROLES="gruppe"
static final String
ConstantTYPED_ALTERNATIVE_ID="typed_alt_user_id"
static final String
ConstantUSER_ID="user_id"
static final String
ConstantUSERNAME="username"
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
-
Constructor Summary
ConstructorDescriptionConstructor for HiOrgServerProfileDefinition. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
extractRoles
(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, 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, 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:
getProfileUrl
in 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:
extractUserProfile
in classOAuthProfileDefinition
- Parameters:
body
- the response body- Returns:
- the returned profile
-
extractRoles
extractRoles.
- Parameters:
profile
- aHiOrgServerProfile
object
-