Interface OAuth2ProviderService


public interface OAuth2ProviderService
  • Method Details

    • listClients

      List<Client> listClients()
      Gets all Clients
      Returns:
      the clients stored in the system
    • findClient

      Optional<Client> findClient(String clientId)
      Find the client using the clientId
      Returns:
      the found Client or empty if not found
    • findClientByEntityId

      default Optional<Client> findClientByEntityId(String clientEntityId)
      Find the client using the client entity id
      Returns:
      the found Client or empty if not found
      Since:
      4.1.0
    • listCurrentUsersAccessTokens

      List<AccessToken> listCurrentUsersAccessTokens()
      Gets all the current users access tokens
      Returns:
      the tokens for the current user or an empty list
    • findClientLastAccessedDate

      Optional<Instant> findClientLastAccessedDate(String clientId)
      Finds the last accessed date for a client. This is the date when the client last accessed the system, which is typically the last time it used an access token. This is useful for tracking client activity.
      Parameters:
      clientId - the client id to find the last accessed date for
      Returns:
      an Optional containing the last accessed date if it exists, or empty if the client has never accessed the system or the client does not exist
      Since:
      5.1.0
    • findLastAccessedDatesForClients

      Map<String,Instant> findLastAccessedDatesForClients(Collection<String> clientIds)
      Finds the last accessed date for each client by their client IDs. This method retrieves the last time each client accessed the system, typically when they used an access token.
      Parameters:
      clientIds - the client IDs to find the last accessed dates for
      Returns:
      a map of client IDs to their last accessed dates, or an empty map if no clients were found
      Since:
      5.1.0
    • listCurrentUsersRefreshTokens

      List<RefreshToken> listCurrentUsersRefreshTokens()
      Gets all the current users refresh tokens
      Returns:
      the tokens for the current user or an empty list
    • getOAuth2AuthorizationServerMetadata

      OAuth2AuthorizationServerMetadata getOAuth2AuthorizationServerMetadata()
      Gets the OAuth 2 server metadata: endpoints, response types supported, scopes supported etc
      Returns:
      OAuth 2 server metadata