Class LinkedInClient
- java.lang.Object
-
- org.forgerock.oauth.clients.oauth2.OAuth2Client<LinkedInClientConfiguration>
-
- org.forgerock.oauth.clients.linkedin.LinkedInClient
-
- All Implemented Interfaces:
OAuthClient
public class LinkedInClient extends OAuth2Client<LinkedInClientConfiguration>
Oauth 2.0 Client Implementation that supports LinkedIn.
-
-
Field Summary
-
Fields inherited from class org.forgerock.oauth.clients.oauth2.OAuth2Client
ACCEPT_HEADER, ACCESS_TOKEN, addExpireTime, APPLICATION_JSON, AUTHORIZATION_CODE, AUTHORIZATION_HEADER, BASIC_AUTH, BEARER_TOKEN, CLIENT_ID, CLIENT_SECRET, clock, CODE, DATA, EXPIRE_TIME, EXPIRES_IN, GRANT_TYPE, HTTP_GET, HTTP_POST, httpHandler, LANDING_PAGE, PKCE_CODE_CHALLENGE, PKCE_CODE_CHALLENGE_METHOD, PKCE_CODE_VERIFIER, random, REDIRECT_URI, REFRESH_TOKEN, RESPONSE_MODE, RESPONSE_TYPE, SCOPE, STATE, TOKEN, TOKEN_TYPE, TOKEN_TYPE_HINT
-
-
Constructor Summary
Constructors Constructor Description LinkedInClient(Handler httpHandler, LinkedInClientConfiguration config, Clock clock, SecureRandom random)
Constructs aLinkedInClient
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Promise<UserInfo,OAuthException>
getUserInfo(DataStore dataStore)
Return the authenticated user's info from the external authentication server.-
Methods inherited from class org.forgerock.oauth.clients.oauth2.OAuth2Client
createAuthorizationState, createAuthRedirectUri, createAuthRedirectUri, createPkceVerifier, createPostAuthResponse, createPostResponse, createRequestForIntrospectEndpoint, createRequestForTokenEndpoint, createRequestForTokenEndpoint, createRequestForTokenRefresh, createRequestForUserInfoEndpoint, getAccessToken, getAccessTokenInfo, getAuthRedirect, getConfig, getFirstValueOrNull, getSessionInfo, getTokenEndpointHandler, handleNativePostAuth, handlePostAuth, mapToJsonValue, mapToUserInfo, refresh, storeResponse, throwIfNoClientSecret, validateClientId
-
-
-
-
Constructor Detail
-
LinkedInClient
public LinkedInClient(Handler httpHandler, LinkedInClientConfiguration config, Clock clock, SecureRandom random)
Constructs aLinkedInClient
.- Parameters:
httpHandler
- handler used to make http calls to auth and resource serversconfig
- configuration used to drive the oauth flowclock
- Clock instancerandom
- used to generate opaque, cryptographically secure strings
-
-
Method Detail
-
getUserInfo
public Promise<UserInfo,OAuthException> getUserInfo(DataStore dataStore)
Description copied from interface:OAuthClient
Return the authenticated user's info from the external authentication server.- Specified by:
getUserInfo
in interfaceOAuthClient
- Overrides:
getUserInfo
in classOAuth2Client<LinkedInClientConfiguration>
- Parameters:
dataStore
- The data store that contains information about the OAuth interaction.- Returns:
Promise
, with a type ofUserInfo
, containing the available user info.Promise
, with a type ofOAuthException
, when an error occurs.
-
-