Package org.openhab.core.auth
Interface AuthenticatedUser
- All Superinterfaces:
Identifiable<String>,Principal,User
- All Known Implementing Classes:
ManagedUser
A
User that is authenticated by the system itself, i.e., session state and API tokens are managed by the
system.- Author:
- Florian Hotze - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionGets the long-term API tokens for this user@Nullable PendingTokenGets the pending token information for this user, if any.Gets the current persistent sessions for this user.voidsetApiTokens(List<UserApiToken> apiTokens) Replaces the list of API tokens by a new one.voidsetPendingToken(@Nullable PendingToken pendingToken) Sets or clears the pending token information for this user.voidsetSessions(List<UserSession> sessions) Replaces the list of sessions by a new one.Methods inherited from interface org.openhab.core.common.registry.Identifiable
getUID
-
Method Details
-
getPendingToken
@Nullable PendingToken getPendingToken()Gets the pending token information for this user, if any.- Returns:
- the pending token information or null if there is none
-
setPendingToken
Sets or clears the pending token information for this user.- Parameters:
pendingToken- the pending token information or null to clear it
-
getSessions
List<UserSession> getSessions()Gets the current persistent sessions for this user.- Returns:
- the list of sessions
-
setSessions
Replaces the list of sessions by a new one.- Parameters:
sessions- the new list of sessions
-
getApiTokens
List<UserApiToken> getApiTokens()Gets the long-term API tokens for this user- Returns:
- the API tokens
-
setApiTokens
Replaces the list of API tokens by a new one.- Parameters:
apiTokens- the new API tokens
-