Package org.pac4j.oauth.profile.strava
Class StravaProfileDefinition
- 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.strava.StravaProfileDefinition
-
public class StravaProfileDefinition extends OAuthProfileDefinition
This class is the Strava profile definition.- Since:
- 1.7.0
- Author:
- Adrian Papusoi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BADGE_TYPE_ID
static java.lang.String
BIKES
static java.lang.String
CITY
static java.lang.String
CLUBS
static java.lang.String
COUNTRY
static java.lang.String
CREATED_AT
static java.lang.String
DATE_PREFERENCE
static java.lang.String
FIRST_NAME
static java.lang.String
FOLLOWER_COUNT
static java.lang.String
FRIEND_COUNT
static java.lang.String
ID
static java.lang.String
LAST_NAME
static java.lang.String
MEASUREMENT_PREFERENCE
static java.lang.String
PREMIUM
static java.lang.String
PROFILE
static java.lang.String
PROFILE_MEDIUM
static java.lang.String
RESOURCE_STATE
static java.lang.String
SEX
static java.lang.String
SHOES
static java.lang.String
STATE
static java.lang.String
UPDATED_AT
-
Constructor Summary
Constructors Constructor Description StravaProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StravaProfile
extractUserProfile(java.lang.String body)
Extract the user profile from the response (JSON, XML...) of the profile url.java.lang.String
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, getParameter, getPrimaryAttributes, getProfileId, getSecondaryAttributes, isRestoreProfileFromTypedId, newProfile, primary, secondary, setProfileFactory, setProfileId, setRestoreProfileFromTypedId
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
RESOURCE_STATE
public static final java.lang.String RESOURCE_STATE
- See Also:
- Constant Field Values
-
FIRST_NAME
public static final java.lang.String FIRST_NAME
- See Also:
- Constant Field Values
-
LAST_NAME
public static final java.lang.String LAST_NAME
- See Also:
- Constant Field Values
-
PROFILE_MEDIUM
public static final java.lang.String PROFILE_MEDIUM
- See Also:
- Constant Field Values
-
PROFILE
public static final java.lang.String PROFILE
- See Also:
- Constant Field Values
-
CITY
public static final java.lang.String CITY
- See Also:
- Constant Field Values
-
STATE
public static final java.lang.String STATE
- See Also:
- Constant Field Values
-
COUNTRY
public static final java.lang.String COUNTRY
- See Also:
- Constant Field Values
-
SEX
public static final java.lang.String SEX
- See Also:
- Constant Field Values
-
PREMIUM
public static final java.lang.String PREMIUM
- See Also:
- Constant Field Values
-
CREATED_AT
public static final java.lang.String CREATED_AT
- See Also:
- Constant Field Values
-
UPDATED_AT
public static final java.lang.String UPDATED_AT
- See Also:
- Constant Field Values
-
BADGE_TYPE_ID
public static final java.lang.String BADGE_TYPE_ID
- See Also:
- Constant Field Values
-
FOLLOWER_COUNT
public static final java.lang.String FOLLOWER_COUNT
- See Also:
- Constant Field Values
-
FRIEND_COUNT
public static final java.lang.String FRIEND_COUNT
- See Also:
- Constant Field Values
-
DATE_PREFERENCE
public static final java.lang.String DATE_PREFERENCE
- See Also:
- Constant Field Values
-
MEASUREMENT_PREFERENCE
public static final java.lang.String MEASUREMENT_PREFERENCE
- See Also:
- Constant Field Values
-
CLUBS
public static final java.lang.String CLUBS
- See Also:
- Constant Field Values
-
BIKES
public static final java.lang.String BIKES
- See Also:
- Constant Field Values
-
SHOES
public static final java.lang.String SHOES
- 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:OAuthProfileDefinition
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
public StravaProfile extractUserProfile(java.lang.String body)
Description copied from class:OAuthProfileDefinition
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
-
-