org.modeshape.jcr

## Class RepositoryConfiguration.AnonymousSecurity

- java.lang.Object
- - org.modeshape.jcr.RepositoryConfiguration.AnonymousSecurity

- Enclosing class:
    RepositoryConfiguration

      @Immutable
      public class RepositoryConfiguration.AnonymousSecurity
      extends Object

  The configuration of the use of the built-in anonymous authentication and authorization provider. Note that this is not used if the anonymous provider is specified in the '`providers`' field.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RepositoryConfiguration.AnonymousSecurity(Document anonymous)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<String>` | `getAnonymousRoles()` Get the name of the ModeShape authorization roles that each anonymous user should be assigned.
    `String` | `getAnonymousUsername()` Get the username that each anonymous user should be assigned.
    `boolean` | `useAnonymousOnFailedLogings()` Determine whether users that fail all other authentication should be automatically logged in as an anonymous user.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RepositoryConfiguration.AnonymousSecurity

          protected RepositoryConfiguration.AnonymousSecurity(Document anonymous)

  - ### Method Detail

    - #### getAnonymousRoles

          public Set<String> getAnonymousRoles()

      Get the name of the ModeShape authorization roles that each anonymous user should be assigned.
      Returns:
        the set of role names; never null or empty, and '' by default.

    - #### getAnonymousUsername

          public String getAnonymousUsername()

      Get the username that each anonymous user should be assigned.
      Returns:
        the anonymous username; never null and '' by default.

    - #### useAnonymousOnFailedLogings

          public boolean useAnonymousOnFailedLogings()

      Determine whether users that fail all other authentication should be automatically logged in as an anonymous user.
      Returns:
        true if non-authenticated users should be given anonymous sessions, or false if authenication should fail; the default is ''.

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.