Class TokenEndpoint

java.lang.Object
ai.wanaku.cli.main.support.security.TokenEndpoint

public final class TokenEndpoint extends Object
Utility class for constructing OAuth2 token endpoint URLs. Provides methods for creating endpoint URLs either directly or from base URLs.
  • Method Details

    • direct

      public static String direct(String uri)
      Returns the provided URI directly as the token endpoint.
      Parameters:
      uri - The complete token endpoint URI.
      Returns:
      The same URI.
    • fromBaseUrl

      public static String fromBaseUrl(String baseUrl)
      Constructs a token endpoint URL by appending the standard OpenID Connect path to a base URL.
      Parameters:
      baseUrl - The base URL of the authentication server.
      Returns:
      The complete token endpoint URL.
    • forDiscovery

      public static String forDiscovery(String baseUrl)
      Constructs a token endpoint URL by appending the discovery OpenID Connect path to a base URL.
      Parameters:
      baseUrl - The base URL of the authentication server.
      Returns:
      The complete token endpoint URL.