Class OidcClientImpl
- java.lang.Object
-
- org.dspace.authenticate.oidc.impl.OidcClientImpl
-
- All Implemented Interfaces:
OidcClient
public class OidcClientImpl extends Object implements OidcClient
Implementation ofOidcClient.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description OidcClientImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OidcTokenResponseDTOgetAccessToken(String code)Exchange the authorization code for a 3-legged access token.Map<String,Object>getUserInfo(String accessToken)Retrieve the info related to the user associated with the given accessToken from the user info endpoint.
-
-
-
Method Detail
-
getAccessToken
public OidcTokenResponseDTO getAccessToken(String code) throws OidcClientException
Description copied from interface:OidcClientExchange the authorization code for a 3-legged access token. The authorization code expires upon use.- Specified by:
getAccessTokenin interfaceOidcClient- Parameters:
code- the authorization code- Returns:
- the OIDC token
- Throws:
OidcClientException- if some error occurs during the exchange
-
getUserInfo
public Map<String,Object> getUserInfo(String accessToken) throws OidcClientException
Description copied from interface:OidcClientRetrieve the info related to the user associated with the given accessToken from the user info endpoint.- Specified by:
getUserInfoin interfaceOidcClient- Parameters:
accessToken- the access token- Returns:
- a map with the user infos
- Throws:
OidcClientException- if some error occurs during the exchange
-
-