Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.security
Class DefaultUserIdentity

    java.lang.Object
      org.eclipse.jetty.security.DefaultUserIdentity

All Implemented Interfaces:
  UserIdentity

    public class DefaultUserIdentity

extends java.lang.Object
implements UserIdentity

The default implementation of UserIdentity.

Nested Class Summary

Nested classes/interfaces inherited from interface org.eclipse.jetty.server.UserIdentity
`UserIdentity.Scope, UserIdentity.UnauthenticatedUserIdentity`

Field Summary

Fields inherited from interface org.eclipse.jetty.server.UserIdentity
`UNAUTHENTICATED_IDENTITY`

Constructor Summary
`DefaultUserIdentity(javax.security.auth.Subject subject, java.security.Principal userPrincipal, java.lang.String[] roles)`

Method Summary
`javax.security.auth.Subject` | `getSubject()`
`java.security.Principal` | `getUserPrincipal()`
`boolean` | `isUserInRole(java.lang.String role, UserIdentity.Scope scope)` Check if the user is in a role.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DefaultUserIdentity

    public DefaultUserIdentity(javax.security.auth.Subject subject,
                               java.security.Principal userPrincipal,
                               java.lang.String[] roles)

Method Detail

### getSubject

    public javax.security.auth.Subject getSubject()

  Specified by:
    `getSubject` in interface `UserIdentity`
  Returns:
    The user subject

### getUserPrincipal

    public java.security.Principal getUserPrincipal()

  Specified by:
    `getUserPrincipal` in interface `UserIdentity`
  Returns:
    The user principal

### isUserInRole

    public boolean isUserInRole(java.lang.String role,
                                UserIdentity.Scope scope)

  Description copied from interface: `UserIdentity`
  Check if the user is in a role. This call is used to satisfy authorization calls from container code which will be using translated role names.

  Specified by:
    `isUserInRole` in interface `UserIdentity`
  Parameters:
    `role` - A role name.
  Returns:
    True if the user can act in that role.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.