Class DSpaceAuthentication

java.lang.Object
org.dspace.app.rest.security.DSpaceAuthentication
All Implemented Interfaces:
Serializable, Principal, Authentication

public class DSpaceAuthentication extends Object implements 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 Details

    • DSpaceAuthentication

      public DSpaceAuthentication(EPerson ePerson, List<GrantedAuthority> authorities)
      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 EPerson
      authorities - EPerson's authorities
    • DSpaceAuthentication

      public 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.

      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 for
      password - 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