Class LinkedInClient
java.lang.Object
org.forgerock.oauth.clients.oauth2.OAuth2Client<LinkedInClientConfiguration>
org.forgerock.oauth.clients.linkedin.LinkedInClient
- All Implemented Interfaces:
OAuthClient
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
ConstructorDescriptionLinkedInClient
(Handler httpHandler, LinkedInClientConfiguration config, Clock clock, SecureRandom random) Constructs aLinkedInClient
. -
Method Summary
Modifier and TypeMethodDescriptiongetUserInfo
(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 Details
-
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 Details
-
getUserInfo
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.
-