Package com.io7m.idstore.server.security

# Class IdSecurity

java.lang.Object
com.io7m.idstore.server.security.IdSecurity

public final class IdSecurity extends Object
The main API for performing security policy checks.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static IdSecPolicyResultType`
  `check(IdSecActionType action)`
  Check that a user is allowed to perform an action by the current policy.
  `static void`
  `setPolicy(IdSecPolicyType policy)`
  Set the currently loaded policy.

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

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

- ## Method Details

  - ### setPolicy

    public static void setPolicy(IdSecPolicyType policy)
    Set the currently loaded policy.
    Parameters:
      `policy` - The policy

  - ### check

    public static IdSecPolicyResultType check(IdSecActionType action) throws IdSecurityException
    Check that a user is allowed to perform an action by the current policy.
    Parameters:
      `action` - The action
    Returns:
      A value indicating if the action is permitted
    Throws:
      `IdSecurityException` - On evaluation errors