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.modeshape.web.jcr
Class ServletSecurityContext

    java.lang.Object
      org.modeshape.web.jcr.ServletSecurityContext

All Implemented Interfaces:
  SecurityContext

Deprecated.

    @Deprecated
    public class ServletSecurityContext

extends Object
implements SecurityContext

Servlet-based `security context` that assumes servlet-based authentication and provides authorization through the `servlet role-checking mechanism`.

This security context is really only valid for the life of the `servlet request` and should only be used to support longer-lasting session scopes with great care. *

Constructor Summary
`ServletSecurityContext(javax.servlet.http.HttpServletRequest request)` Deprecated. Create a `ServletSecurityContext` with the supplied `servlet information`.

Method Summary
`String` | `getUserName()` Deprecated. Returns the authenticated user's name
`boolean` | `hasRole(String roleName)` Deprecated. Returns whether the authenticated user has the given role.
`void` | `logout()` Deprecated. Logs the user out of the authentication mechanism.

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

Constructor Detail

### ServletSecurityContext

    public ServletSecurityContext(javax.servlet.http.HttpServletRequest request)

  Deprecated.
  Create a `ServletSecurityContext` with the supplied `servlet information`.

  Parameters:
    `request` - the servlet request; may not be null

Method Detail

### getUserName

    public final String getUserName()

  Deprecated.
  Returns the authenticated user's name

  Specified by:
    `getUserName` in interface `SecurityContext`
  Returns:
    the authenticated user's name
  See Also:
    `SecurityContext.getUserName()`

### hasRole

    public final boolean hasRole(String roleName)

  Deprecated.
  Returns whether the authenticated user has the given role.

  Specified by:
    `hasRole` in interface `SecurityContext`
  Parameters:
    `roleName` - the name of the role to check
  Returns:
    true if the user has the role and is logged in; false otherwise
  See Also:
    `SecurityContext.hasRole(String)`

### logout

    public void logout()

  Deprecated.
  Logs the user out of the authentication mechanism.

  For some authentication mechanisms, this will be implemented as a no-op.

  Specified by:
    `logout` in interface `SecurityContext`
  See Also:
    `SecurityContext.logout()`

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 © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.