Interface PolicyRequestDetails


  • public interface PolicyRequestDetails
    Object passed to Advice implementations containing information about the policy request that triggered the return of the Advice.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<TokenValidationResult> getAccessToken()
      Get access token details.
      java.lang.String getAction()
      Get the action for which authorization was requested.
      java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      Get additional policy request attributes.
      PolicyDecision getDecision()
      Get the decision returned from the authorization request.
      java.util.Optional<com.fasterxml.jackson.databind.JsonNode> getResource()
      Gets the contents of the resource to which access was requested.
      java.lang.String getResourcePath()
      Get the path to the resource for which authorization was requested.
      java.lang.String getResourceType()
      Get the type of resource to which authorization was requested.
      java.lang.String getService()
      Get the name of the service on whose behalf the request is being authorized.
      java.util.Optional<TokenOwnerPrincipal> getTokenOwner()
      Get information about the token owner.
    • Method Detail

      • getAction

        java.lang.String getAction()
        Get the action for which authorization was requested.
        Returns:
        The action string that was passed in the policy request.
      • getService

        java.lang.String getService()
        Get the name of the service on whose behalf the request is being authorized.
        Returns:
        The service name.
      • getResourcePath

        java.lang.String getResourcePath()
        Get the path to the resource for which authorization was requested.
        Returns:
        The resource path.
      • getResourceType

        java.lang.String getResourceType()
        Get the type of resource to which authorization was requested.
        Returns:
        A string representing the resource type.
      • getResource

        java.util.Optional<com.fasterxml.jackson.databind.JsonNode> getResource()
        Gets the contents of the resource to which access was requested. Note that this object may not be available in all cases.
        Returns:
        The resource contents as a JSON node.
      • getTokenOwner

        java.util.Optional<TokenOwnerPrincipalgetTokenOwner()
        Get information about the token owner. This is only available if an access token was used and a Token Resource Lookup Method successfully looked up the token subject.
        Returns:
        Token owner details.
      • getAccessToken

        java.util.Optional<TokenValidationResultgetAccessToken()
        Get access token details. This is only available if an access token was used and an Access Token Validator was able to validate the token.
        Returns:
        Access token details.
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.String> getAttributes()
        Get additional policy request attributes.
        Returns:
        Additional policy request attributes.
      • getDecision

        PolicyDecision getDecision()
        Get the decision returned from the authorization request.
        Returns:
        PolicyDecision enum representing either Permit or Deny.