| java.lang.Object org.jamwiki.model.WikiUser org.jamwiki.authentication.WikiUserAuth
WikiUserAuth | public class WikiUserAuth extends WikiUser implements UserDetails(Code) | | |
Constructor Summary | |
public | WikiUserAuth(WikiUser wikiUser) | public | WikiUserAuth(String username) | public | WikiUserAuth(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, GrantedAuthority[] authorities) Construct the User with the details required by
org.acegisecurity.providers.dao.DaoAuthenticationProvider . |
WikiUserAuth | public WikiUserAuth(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, GrantedAuthority[] authorities)(Code) | | Construct the User with the details required by
org.acegisecurity.providers.dao.DaoAuthenticationProvider . This
method should be used by systems that do NOT use the default JAMWiki
user and group roles. This method will NOT assign default roles to the
user, and as a result the Special:Roles functionality will be ignored.
Parameters: username - the username presented to theDaoAuthenticationProvider Parameters: password - the password that should be presented to theDaoAuthenticationProvider Parameters: enabled - set to true if the user is enabled Parameters: accountNonExpired - set to true if the account has notexpired Parameters: credentialsNonExpired - set to true if the credentialshave not expired Parameters: accountNonLocked - set to true if the account is notlocked Parameters: authorities - the authorities that should be granted to the callerif they presented the correct username and password and the useris enabled throws: IllegalArgumentException - if a null value was passedeither as a parameter or as an element in theGrantedAuthority[] array. |
getAuthorities | public GrantedAuthority[] getAuthorities()(Code) | | Returns granted authorites.
authorites, never null. |
hasRole | public boolean hasRole(Role role)(Code) | | Convenience method for determining if a user has been assigned a role
without the need to examine an array of Role objects.
Parameters: role - If the user has been assigned this role then the method willreturn true . true if the user has been assigned the specifiedrole, false otherwise. |
initWikiUserAuth | public static WikiUserAuth initWikiUserAuth(Authentication auth) throws AuthenticationCredentialsNotFoundException(Code) | | Utility method for converting an Acegi Authentication
object into a WikiUserAuth . If the user is logged-in then the
Authentication object will have the WikiUserAuth
as its principal. If the user is not logged in then create an empty
WikiUserAuth object and assign it the same authorities as the
Authentication object.
Parameters: auth - The Acegi Authentication object that is beingconverted into a WikiUserAuth object. Returns a WikiUserAuth object that corresponds to theAcegi Authentication object. If the user is not currentlylogged-in then an empty WikiUserAuth with the same authoritiesas the Authentication object is returned. This methodwill never return null . throws: AuthenticationCredentialsNotFoundException - If authenticationcredentials are unavailable. |
isAccountNonExpired | public boolean isAccountNonExpired()(Code) | | |
isAccountNonLocked | public boolean isAccountNonLocked()(Code) | | |
isCredentialsNonExpired | public boolean isCredentialsNonExpired()(Code) | | |
isEnabled | public boolean isEnabled()(Code) | | |
resetDefaultGroupRoles | public static void resetDefaultGroupRoles()(Code) | | Force a reset of the default logged-in users roles. This method should
be called if the roles allowed to logged-in users are changed.
|
setAuthorities | protected void setAuthorities(GrantedAuthority[] authorities)(Code) | | |
|
|