Package org.dspace.app.rest.security
Class DSpaceAuthentication
java.lang.Object
org.dspace.app.rest.security.DSpaceAuthentication
- All Implemented Interfaces:
Serializable,Principal,Authentication
Custom Authentication for use with DSpace
- Author:
- Frederic Van Reet (frederic dot vanreet at atmire dot com), Tom Desair (tom dot desair at atmire dot com)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a temporary, empty DSpaceAuthentication instance which may be used to trigger an implicit authentication.DSpaceAuthentication(String username, String password) Create a temporary DSpaceAuthentication instance which may be used to store information about the user who will be attempting authentication.DSpaceAuthentication(EPerson ePerson, List<GrantedAuthority> authorities) Create a DSpaceAuthentication instance for an already authenticated EPerson, including their GrantedAuthority objects. -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends GrantedAuthority>getName()booleanvoidsetAuthenticated(boolean authenticated)
-
Constructor Details
-
DSpaceAuthentication
Create a DSpaceAuthentication instance for an already authenticated EPerson, including their GrantedAuthority objects.NOTE: This type of DSpaceAuthentication object is returned to Spring after a successful authentication.
- Parameters:
ePerson- authenticated EPersonauthorities- EPerson's authorities
-
DSpaceAuthentication
Create a temporary DSpaceAuthentication instance which may be used to store information about the user who will be attempting authentication.NOTE: This type of DSpaceAuthentication object is used to attempt a new authentication in DSpace. It is therefore temporary in nature, as it will be discarded after successful authentication.
- Parameters:
username- username to attempt authentication forpassword- password to use for authentication
-
DSpaceAuthentication
public DSpaceAuthentication()Create a temporary, empty DSpaceAuthentication instance which may be used to trigger an implicit authentication. An example is Shibboleth, as this doesn't require an explicit username/password, as the user will have been authenticated externally, and DSpace just needs to perform an implicit authentication by looking for the auth data passed to it by Shibboleth.
-
-
Method Details
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceAuthentication
-
getCredentials
- Specified by:
getCredentialsin interfaceAuthentication
-
getDetails
- Specified by:
getDetailsin interfaceAuthentication
-
getPrincipal
- Specified by:
getPrincipalin interfaceAuthentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceAuthentication
-
setAuthenticated
- Specified by:
setAuthenticatedin interfaceAuthentication- Throws:
IllegalArgumentException
-
getName
-
getPreviousLoginDate
-