Class AccessTokenManager

java.lang.Object
org.linkedopenactors.rdfpub.client.AccessTokenManager

public class AccessTokenManager extends Object
AccessTokenManager.
Author:
naturzukunft@mastodon.social
  • Constructor Details

    • AccessTokenManager

      public AccessTokenManager(org.springframework.web.reactive.function.client.WebClient webClient, String keycloakServerUrl, String clientApplicationRealm, String clientApplicationClientId, String clientApplicationClientSecret, int authTokenLifetime)
      Parameters:
      webClient - The webclient to use for http communication.
      keycloakServerUrl - The base url of the auth server. E.g. http://localhost:8080/auth
      clientApplicationRealm - The realm name of the keycloak server that contains the cliet application. E.g. LOA
      clientApplicationClientId - The oauth2 client_id (The client_id is a public identifier for apps).
      clientApplicationClientSecret - The oauth2 client_secret (The client_secret is a secret known only to the application and the authorization server).
      authTokenLifetime - The lifetime of the token
  • Method Details

    • getAuthToken

      public String getAuthToken(String clientApplicationUserName, String clientApplicationPassword)