Package org.openhab.core.auth
Class UserApiToken
java.lang.Object
org.openhab.core.auth.UserApiToken
An API token represents long-term credentials generated by (or for) a user, giving the bearer access for a certain
 scope on behalf of this user.
- Author:
 - Yannick Schaus - initial contribution
 
- 
Constructor Summary
ConstructorsConstructorDescriptionUserApiToken(String name, String apiToken, String scope) Constructs an API token. - 
Method Summary
Modifier and TypeMethodDescriptionGet the serialization of the opaque API token which can be passed in requests as a "Bearer" token in the Authorization HTTP header.Gets the time when this token was created.getName()Gets the name identifying the tokengetScope()Gets the scope this token is valid for.toString() 
- 
Constructor Details
- 
UserApiToken
Constructs an API token.- Parameters:
 name- the name of the token, for identification purposesapiToken- the serialization of the tokenscope- the scope this token is valid for
 
 - 
 - 
Method Details
- 
getName
Gets the name identifying the token- Returns:
 - the API token
 
 - 
getApiToken
Get the serialization of the opaque API token which can be passed in requests as a "Bearer" token in the Authorization HTTP header.- Returns:
 - the API token
 
 - 
getCreatedTime
Gets the time when this token was created.- Returns:
 - the date of creation
 
 - 
getScope
Gets the scope this token is valid for.- Returns:
 - the scope
 
 - 
toString
 
 -