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
ACCESS_TOKEN, addExpireTime, AUTHORIZATION_CODE, AUTHORIZATION_HEADER, BASIC_AUTH, BEARER_TOKEN, CLIENT_ID, CLIENT_SECRET, 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_TYPE, SCOPE, STATE, timeService
-
-
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
addClientIdAndSecret, createAuthorizationState, createAuthRedirectUri, createAuthRedirectUri, createPkceVerifier, createPostAuthResponse, createRequestForTokenEndpoint, createRequestForTokenEndpoint, createRequestForTokenRefresh, createRequestForUserInfoEndpoint, getAccessToken, getAuthRedirect, getConfig, getFirstValueOrNull, getSessionInfo, handlePostAuth, mapToJsonValue, mapToUserInfo, refresh, storeResponse, throwIfNoClientSecret
-
-
-
-
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.
-
-