Interface SecurityTokenService

All Known Implementing Classes:
DefaultSecurityTokenService

public interface SecurityTokenService
Service API for SecurityToken management.
Since:
3.4
Version:
1.0
Author:
matt
  • Method Details

    • getAvailableTokens

      Collection<SecurityToken> getAvailableTokens()
      Get all available security tokens.

      The token secrets are not returned by this method.

      Returns:
      the tokens, never null
    • tokenForId

      SecurityToken tokenForId(String tokenId)
      Get a security token for a given ID.
      Parameters:
      tokenId - the token ID
      Returns:
      the token, or null if not found
    • createToken

      net.solarnetwork.domain.KeyValuePair createToken(SecurityToken details)
      Create a new token.

      This method will generate a new security token and return the generated token ID and secret.

      Parameters:
      details - the optional details (name, description) to use
      Returns:
      the token ID and token secret
    • updateToken

      void updateToken(SecurityToken token)
      Update the modifiable values of a security token.

      The token ID and secret cannot be changed by this method, but properties like name and description can.

      Parameters:
      token - the token details to update
    • deleteToken

      void deleteToken(String tokenId)
      Delete a security token.

      No error is thrown if the given tokenId does not exist.

      Parameters:
      tokenId - the ID of the token to delete