org.keycloak.authorization.policy.evaluation

## Interface Evaluation

- All Known Implementing Classes:
    DefaultEvaluation

      public interface Evaluation

  An `Evaluation` is mainly used by `PolicyProvider` in order to evaluate a single and specific `ResourcePermission` against the configured policies.

  Author:
    Pedro Igor

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deny()` Denies the requested permission.
    `void` | `denyIfNoEffect()` Denies the requested permission if a decision was not made yet.
    `AuthorizationProvider` | `getAuthorizationProvider()`
    `EvaluationContext` | `getContext()` Returns the `EvaluationContext`.
    `ResourcePermission` | `getPermission()` Returns the `ResourcePermission` to be evaluated.
    `Policy` | `getPolicy()` Returns the `Policy`.
    `Realm` | `getRealm()` Returns a `Realm` that can be used by policies to query information.
    `void` | `grant()` Grants the requested permission to the caller.

- - ### Method Detail

    - #### getPermission

          ResourcePermission getPermission()

      Returns the `ResourcePermission` to be evaluated.
      Returns:
        the permission to be evaluated

    - #### getContext

          EvaluationContext getContext()

      Returns the `EvaluationContext`. Which provides access to the whole evaluation runtime context.
      Returns:
        the evaluation context

    - #### getPolicy

          Policy getPolicy()

      Returns the `Policy`. being evaluated.
      Returns:
        the evaluation context

    - #### getRealm

          Realm getRealm()

      Returns a `Realm` that can be used by policies to query information.
      Returns:
        a `Realm` instance

    - #### getAuthorizationProvider

          AuthorizationProvider getAuthorizationProvider()

    - #### grant

          void grant()

      Grants the requested permission to the caller.

    - #### deny

          void deny()

      Denies the requested permission.

    - #### denyIfNoEffect

          void denyIfNoEffect()

      Denies the requested permission if a decision was not made yet.

Copyright © 2021 JBoss by Red Hat. All rights reserved.