Package org.dspace.app.rest.security
Class EPersonRestAuthenticationProvider
java.lang.Object
org.dspace.app.rest.security.EPersonRestAuthenticationProvider
- All Implemented Interfaces:
AuthenticationProvider
@Component
public class EPersonRestAuthenticationProvider
extends Object
implements AuthenticationProvider
This class is responsible for authenticating a user via REST.
- Author:
- Frederic Van Reet (frederic dot vanreet at atmire dot com), Tom Desair (tom dot desair at atmire dot com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Authentication authentication) getGrantedAuthorities(Context context) Return list of GrantedAuthority objects for the user currently authenticated in the ContextvoidbooleanReturn whether this provider supports this Authentication type.
-
Field Details
-
MANAGE_ACCESS_GROUP
- See Also:
-
-
Constructor Details
-
EPersonRestAuthenticationProvider
public EPersonRestAuthenticationProvider()
-
-
Method Details
-
postConstruct
@PostConstruct public void postConstruct() -
authenticate
- Specified by:
authenticatein interfaceAuthenticationProvider- Throws:
AuthenticationException
-
getGrantedAuthorities
Return list of GrantedAuthority objects for the user currently authenticated in the Context- Parameters:
context- current DSpace context- Returns:
- List of GrantedAuthority. Empty list is returned if no current user exists.
-
supports
Return whether this provider supports this Authentication type. Only returns true if the Authentication type is a valid DSpaceAuthentication class.- Specified by:
supportsin interfaceAuthenticationProvider- Parameters:
authentication-- Returns:
- true if valid DSpaceAuthentication class
-