Package org.eclipse.jetty.jaas.spi
Class UserInfo
- java.lang.Object
-
- org.eclipse.jetty.jaas.spi.UserInfo
-
- Direct Known Subclasses:
AbstractDatabaseLoginModule.JDBCUserInfo
,LdapLoginModule.LDAPUserInfo
public class UserInfo extends java.lang.Object
UserInfo This is the information read from the external source about a user. Can be cached.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>
_roleNames
protected boolean
_rolesLoaded
-
Constructor Summary
Constructors Constructor Description UserInfo(java.lang.String userName, Credential credential)
UserInfo(java.lang.String userName, Credential credential, java.util.List<java.lang.String> roleNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkCredential(java.lang.Object suppliedCredential)
java.util.List<java.lang.String>
doFetchRoles()
Should be overridden by subclasses to obtain role infovoid
fetchRoles()
protected Credential
getCredential()
java.util.List<java.lang.String>
getRoleNames()
java.lang.String
getUserName()
-
-
-
Constructor Detail
-
UserInfo
public UserInfo(java.lang.String userName, Credential credential, java.util.List<java.lang.String> roleNames)
- Parameters:
userName
- the user namecredential
- the credentialroleNames
- aList
of role name
-
UserInfo
public UserInfo(java.lang.String userName, Credential credential)
- Parameters:
userName
- the user namecredential
- the credential
-
-
Method Detail
-
doFetchRoles
public java.util.List<java.lang.String> doFetchRoles() throws java.lang.Exception
Should be overridden by subclasses to obtain role info- Returns:
- List of role associated to the user
- Throws:
java.lang.Exception
- if the roles cannot be retrieved
-
fetchRoles
public void fetchRoles() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getUserName
public java.lang.String getUserName()
-
getRoleNames
public java.util.List<java.lang.String> getRoleNames()
-
checkCredential
public boolean checkCredential(java.lang.Object suppliedCredential)
-
getCredential
protected Credential getCredential()
-
-