org.jboss.resteasy.plugins.server.embedded

## Class SimpleSecurityDomain

- java.lang.Object
- - org.jboss.resteasy.plugins.server.embedded.SimpleSecurityDomain

- All Implemented Interfaces:
    SecurityDomain

      public class SimpleSecurityDomain
      extends Object
      implements SecurityDomain

  POJO Security domain.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleSecurityDomain()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRole(String user, String role)`
    `void` | `addRoles(String role, String[] users)`
    `void` | `addUser(String username, String password, String[] roles)`
    `Principal` | `authenticate(String username, String password)`
    `boolean` | `isUserInRole(Principal username, String role)`

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

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

- - ### Constructor Detail

    - #### SimpleSecurityDomain

          public SimpleSecurityDomain()

  - ### Method Detail

    - #### addRole

          public void addRole(String user,
                     String role)

    - #### addUser

          public void addUser(String username,
                     String password,
                     String[] roles)

    - #### addRoles

          public void addRoles(String role,
                      String[] users)

    - #### authenticate

          public Principal authenticate(String username,
                               String password)
                                 throws SecurityException

      Specified by:
        `authenticate` in interface `SecurityDomain`
      Throws:
        `SecurityException`

    - #### isUserInRole

          public boolean isUserInRole(Principal username,
                             String role)

      Specified by:
        `isUserInRole` in interface `SecurityDomain`

Copyright © 2014. All Rights Reserved.