oracle.dbtools.plugin.api.security

## Class NotAuthorizedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - oracle.dbtools.plugin.api.security.NotAuthorizedException

- All Implemented Interfaces:
    Serializable

      public class NotAuthorizedException
      extends RuntimeException

  Raised whenever a resource is accessed that the current user does not have permission to access.
  Author:
    cdivilly
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotAuthorizedException(String authorizationConstaintName)` Raises a `NotAuthorizedException` condition requiring the user to have authenticated against the `AuthorizationConstraint`, chaining the `cause` parameter as the underlying cause of the authorization failure.
    `NotAuthorizedException(String authorizationConstraintName, AuthorizationError error, Throwable cause)` Raises a `NotAuthorizedException` condition requiring the user to have authenticated against the specified Privilege.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AuthorizationError` | `error()` The `AuthorizationError`.
    `String` | `toString()`

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

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

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

- - ### Constructor Detail

    - #### NotAuthorizedException

          public NotAuthorizedException(String authorizationConstraintName,
                                        AuthorizationError error,
                                        Throwable cause)

      Raises a `NotAuthorizedException` condition requiring the user to have authenticated against the specified Privilege.
      Parameters:
        `authorizationConstraintName` - The name of the `AuthorizationConstraint` that the principal was authorized against
        `error` - `AuthorizationError` explaining the reason for the authorization failure. May be null.
        `cause` - The underlying cause of the authorization failure.

    - #### NotAuthorizedException

          public NotAuthorizedException(String authorizationConstaintName)

      Raises a `NotAuthorizedException` condition requiring the user to have authenticated against the `AuthorizationConstraint`, chaining the `cause` parameter as the underlying cause of the authorization failure.
      Parameters:
        `authorizationConstaintName` - The name of the `AuthorizationConstraint` that this principal failed authorization for.

  - ### Method Detail

    - #### error

          public AuthorizationError error()

      The `AuthorizationError`.
      Returns:
        `AuthorizationError` instance or null, if no error reason specified.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Throwable`

Copyright © 2010, 2022, Oracle and/or its affiliates.