public interface AccessManager
Modifier and Type | Method and Description |
---|---|
void |
addUser(java.lang.String userId,
java.lang.String password,
java.lang.String givenName,
java.lang.String familyName,
java.util.Collection<java.lang.String> roles)
Add a new user.
|
HobsonUser |
authenticate(java.lang.String token)
Authenticates a user.
|
HobsonUser |
authenticate(java.lang.String userId,
java.lang.String password)
Authenticates a user.
|
void |
authorize(HobsonUser user,
java.lang.String action,
java.lang.String resource)
Authorizes a user's access to an action/resource combination.
|
void |
changeUserPassword(java.lang.String userId,
PasswordChange password)
Changes the password for a user.
|
java.lang.String |
createToken(HobsonUser user)
Creates a token for a user.
|
java.lang.String |
getDefaultUser()
Returns the default user if one is available.
|
java.util.Collection<java.lang.String> |
getHubsForUser(java.lang.String userId)
Returns the hubs associated with a user.
|
OIDCConfig |
getOIDCConfig()
Returns the OpenID Connect configuration.
|
java.util.Set<java.lang.String> |
getRoles()
Returns all the valid roles that can be assigned to a user.
|
HobsonUser |
getUser(java.lang.String userId)
Returns details about a user.
|
java.util.Collection<HobsonUser> |
getUsers()
Returns all users in the user store.
|
boolean |
hasDefaultUser()
Indicates whether this access manager has a default user (e.g.
|
boolean |
isFederated()
Indicates whether this access manager is fronting a federated identity provider.
|
void addUser(java.lang.String userId, java.lang.String password, java.lang.String givenName, java.lang.String familyName, java.util.Collection<java.lang.String> roles)
userId
- the user IDpassword
- the passwordgivenName
- the user's first namefamilyName
- the user's last nameroles
- the roles assigned to the userHobsonUser authenticate(java.lang.String userId, java.lang.String password) throws HobsonAuthenticationException
userId
- the user IDpassword
- the passwordHobsonAuthenticationException
- if the user ID/password combination are invalidHobsonUser authenticate(java.lang.String token) throws HobsonAuthenticationException
token
- a tokenHobsonAuthenticationException
- if the token is invalidvoid authorize(HobsonUser user, java.lang.String action, java.lang.String resource) throws HobsonAuthorizationException
user
- the user being checkedaction
- the action that is being performedresource
- the resource the action is being attempted againstHobsonAuthorizationException
- if the user is not authorizedvoid changeUserPassword(java.lang.String userId, PasswordChange password)
userId
- the user IDpassword
- the new passwordjava.lang.String createToken(HobsonUser user)
user
- the userjava.lang.String getDefaultUser()
java.util.Collection<java.lang.String> getHubsForUser(java.lang.String userId)
userId
- the user IDOIDCConfig getOIDCConfig()
java.util.Set<java.lang.String> getRoles()
HobsonUser getUser(java.lang.String userId)
userId
- the user IDjava.util.Collection<HobsonUser> getUsers()
boolean hasDefaultUser()
boolean isFederated()
Copyright © 2015 Whizzo Software LLC. All rights reserved.