Package org.dspace.authenticate.oidc
Interface OidcClient
-
- All Known Implementing Classes:
OidcClientImpl
public interface OidcClientClient to interact with the configured OIDC provider.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Method Summary
All Methods Instance Methods Abstract 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
OidcTokenResponseDTO getAccessToken(String code) throws OidcClientException
Exchange the authorization code for a 3-legged access token. The authorization code expires upon use.- Parameters:
code- the authorization code- Returns:
- the OIDC token
- Throws:
OidcClientException- if some error occurs during the exchange
-
getUserInfo
Map<String,Object> getUserInfo(String accessToken) throws OidcClientException
Retrieve the info related to the user associated with the given accessToken from the user info endpoint.- Parameters:
accessToken- the access token- Returns:
- a map with the user infos
- Throws:
OidcClientException- if some error occurs during the exchange
-
-