Interface OidcClient

All Known Implementing Classes:
OidcClientImpl

public interface OidcClient
Client to interact with the configured OIDC provider.
Author:
Luca Giamminonni (luca.giamminonni at 4science.it)
  • Method Summary

    Modifier and Type
    Method
    Description
    Exchange the authorization code for a 3-legged access token.
    getUserInfo(String accessToken)
    Retrieve the info related to the user associated with the given accessToken from the user info endpoint.
  • Method Details

    • 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