Package net.solarnetwork.node.service
Interface SecurityTokenService
- All Known Implementing Classes:
DefaultSecurityTokenService
public interface SecurityTokenService
Service API for
SecurityToken management.- Since:
- 3.4
- Version:
- 1.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionnet.solarnetwork.domain.KeyValuePaircreateToken(SecurityToken details) Create a new token.voiddeleteToken(String tokenId) Delete a security token.Get all available security tokens.tokenForId(String tokenId) Get a security token for a given ID.voidupdateToken(SecurityToken token) Update the modifiable values of a security token.
-
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
Get a security token for a given ID.- Parameters:
tokenId- the token ID- Returns:
- the token, or null if not found
-
createToken
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
Update the modifiable values of a security token.The token ID and secret cannot be changed by this method, but properties like
nameanddescriptioncan.- Parameters:
token- the token details to update
-
deleteToken
Delete a security token.No error is thrown if the given
tokenIddoes not exist.- Parameters:
tokenId- the ID of the token to delete
-