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

## org.modeshape.jcr.api
Interface SecurityContext

Deprecated. Configure each repository to use a custom AuthenthicationProvider implementation

    @Deprecated
    public interface SecurityContext

This interface is easily adaptable to, but not dependent on, the graph layer `SecurityContext` interface. This removes the dependency between implementing classes and the modeshape-graph module.

This class is not thread-safe.

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.

Method Detail

### getUserName

    String getUserName()

  Deprecated.
  Returns the authenticated user's name

  Returns:
    the authenticated user's name

### hasRole

    boolean hasRole(String roleName)

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

  Parameters:
    `roleName` - the name of the role to check
  Returns:
    true if the user has the role and is logged in; false otherwise

### logout

    void logout()

  Deprecated.
  Logs the user out of the authentication mechanism.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
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.