Package org.onosproject.ui
Interface UiTokenService
-
public interface UiTokenServiceService for handling UI session tokens.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UiSessionTokenissueToken(java.lang.String username)Issues a session token.booleanisTokenValid(UiSessionToken token)Returns true if the specified token is currently in the distributed map of valid UI session tokens.voidrevokeToken(UiSessionToken token)Revokes the specified session token.
-
-
-
Method Detail
-
issueToken
UiSessionToken issueToken(java.lang.String username)
Issues a session token. The service will generate a new token, publish it in the distributed map of valid UI session tokens, and return it to the caller.- Parameters:
username- the username to be associated with the token.- Returns:
- the token
-
revokeToken
void revokeToken(UiSessionToken token)
Revokes the specified session token. The service will remove the token from the distributed map of valid UI session tokens.- Parameters:
token- the token to be revoked
-
isTokenValid
boolean isTokenValid(UiSessionToken token)
Returns true if the specified token is currently in the distributed map of valid UI session tokens.- Parameters:
token- the token to check- Returns:
- true, if the token is currently valid; false otherwise
-
-