Class DefaultIdentityService

  • All Implemented Interfaces:
    IdentityService

    @Deprecated(since="2021-05-27")
    public class DefaultIdentityService
    extends java.lang.Object
    implements IdentityService
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Default Identity Service implementation. This service handles only role reference maps passed in an associated UserIdentity.Scope. If there are roles refs present, then associate will wrap the UserIdentity with one that uses the role references in the UserIdentity.isUserInRole(String, org.eclipse.jetty.server.UserIdentity.Scope) implementation. All other operations are effectively noops.
    • Constructor Detail

      • DefaultIdentityService

        public DefaultIdentityService()
        Deprecated.
    • Method Detail

      • setRunAs

        public java.lang.Object setRunAs​(UserIdentity user,
                                         RunAsToken token)
        Deprecated.
        Description copied from interface: IdentityService
        Associate a runas Token with the current user and thread.
        Specified by:
        setRunAs in interface IdentityService
        Parameters:
        user - The UserIdentity
        token - The runAsToken to associate.
        Returns:
        The previous runAsToken or null.
      • unsetRunAs

        public void unsetRunAs​(java.lang.Object lastToken)
        Deprecated.
        Description copied from interface: IdentityService
        Disassociate the current runAsToken from the thread and reassociate the previous token.
        Specified by:
        unsetRunAs in interface IdentityService
        Parameters:
        lastToken - RUNAS returned from previous associateRunAs call
      • newRunAsToken

        public RunAsToken newRunAsToken​(java.lang.String runAsName)
        Deprecated.
        Description copied from interface: IdentityService
        Create a new RunAsToken from a runAsName (normally a role).
        Specified by:
        newRunAsToken in interface IdentityService
        Parameters:
        runAsName - Normally a role name
        Returns:
        A new immutable RunAsToken
      • newUserIdentity

        public UserIdentity newUserIdentity​(javax.security.auth.Subject subject,
                                            java.security.Principal userPrincipal,
                                            java.lang.String[] roles)
        Deprecated.
        Description copied from interface: IdentityService
        Create a new UserIdentity for use with this identity service. The UserIdentity should be immutable and able to be cached.
        Specified by:
        newUserIdentity in interface IdentityService
        Parameters:
        subject - Subject to include in UserIdentity
        userPrincipal - Principal to include in UserIdentity. This will be returned from getUserPrincipal calls
        roles - set of roles to include in UserIdentity.
        Returns:
        A new immutable UserIdententity