Package org.openhab.core.auth
Class Authentication
java.lang.Object
org.openhab.core.auth.Authentication
Definition of authentication given to username after verification of credentials by authentication provider.
 Each authentication must at least point to some identity (username), roles, and may also be valid for a specific
 scope only.
- Author:
- Ćukasz Dywicki - Initial contribution, Kai Kreuzer - Added JavaDoc and switched from array to Set, Yannick Schaus - Add scope
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedno-args constructor required by gsonAuthentication(String username, String... roles) Creates a new instanceAuthentication(String username, String[] roles, String scope) Creates a new instance with a specific scope
- 
Method Summary
- 
Constructor Details- 
Authenticationprotected Authentication()no-args constructor required by gson
- 
AuthenticationCreates a new instance- Parameters:
- username- name of the user associated to this authentication instance
- roles- a variable list of roles that the user possesses.
 
- 
AuthenticationCreates a new instance with a specific scope- Parameters:
- username- name of the user associated to this authentication instance
- roles- a variable list of roles that the user possesses.
- scope- a scope this authentication is valid for
 
 
- 
- 
Method Details- 
getUsernameRetrieves the name of the authenticated user- Returns:
- user name
 
- 
getRolesRetrieves the roles of the authenticated user- Returns:
- a set of roles
 
- 
getScopeRetrieves the scope this authentication is valid for- Returns:
- a scope
 
 
-