Module Values.IsAuthorizedWithTokenInputSource

Makes an authorization decision about a service request described in the parameters. The principal in this request comes from an external identity source in the form of an identity token formatted as a JSON web token (JWT). The information in the parameters can also define additional context that Verified Permissions can include in the evaluation. The request is evaluated against all matching policies in the specified policy store. The result of the decision is either Allow or Deny, along with a list of the policies that resulted in the decision. Verified Permissions validates each token that is specified in a request by checking its expiration date and its signature. Tokens from an identity source user continue to be usable until they expire. Token revocation and resource deletion have no effect on the validity of a token in your policy store

Sourcetype nonrec t = {
  1. policyStoreId : PolicyStoreId.t;
    (*

    Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input. To specify a policy store, use its ID or alias name. When using an alias name, prefix it with policy-store-alias/. For example: ID: PSEXAMPLEabcdefg111111 Alias name: policy-store-alias/example-policy-store To view aliases, use ListPolicyStoreAliases.

    *)
  2. identityToken : Token.t option;
    (*

    Specifies an identity token for the principal to be authorized. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an accessToken, an identityToken, or both. Must be an ID token. Verified Permissions returns an error if the token_use claim in the submitted token isn't id.

    *)
  3. accessToken : Token.t option;
    (*

    Specifies an access token for the principal to be authorized. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an accessToken, an identityToken, or both. Must be an access token. Verified Permissions returns an error if the token_use claim in the submitted token isn't access.

    *)
  4. action : ActionIdentifier.t option;
    (*

    Specifies the requested action to be authorized. Is the specified principal authorized to perform this action on the specified resource.

    *)
  5. resource : EntityIdentifier.t option;
    (*

    Specifies the resource for which the authorization decision is made. For example, is the principal allowed to perform the action on the resource?

    *)
  6. context : ContextDefinition.t option;
    (*

    Specifies additional context that can be used to make more granular authorization decisions.

    *)
  7. entities : EntitiesDefinition.t option;
    (*

    (Optional) Specifies the list of resources and their associated attributes that Verified Permissions can examine when evaluating the policies. These additional entities and their attributes can be referenced and checked by conditional elements in the policies in the specified policy store. You can't include principals in this parameter, only resource and action entities. This parameter can't include any entities of a type that matches the user or group entity types that you defined in your identity source. The IsAuthorizedWithToken operation takes principal attributes from only the identityToken or accessToken passed to the operation. For action entities, you can include only their Identifier and EntityType.

    *)
}
Sourceval context_ : string
Sourceval make : ?identityToken:??? -> ?accessToken:??? -> ?action:??? -> ?resource:??? -> ?context:??? -> ?entities:??? -> policyStoreId:PolicyStoreId.t -> unit -> t
Sourceval to_value : t -> [> `Structure of (string * [> `String of PolicyStoreId.t | `Structure of (string * [> `List of [> `Structure of (string * [> `List of [> `Structure of (string * [> `String of EntityType.t ]) list ] list | `Map of ([> `String of String_.t ] * Awso.Botodata.value) list | `Structure of (string * [> `String of EntityType.t ]) list ]) list ] list | `Map of ([> `String of String_.t ] * Awso.Botodata.value) list | `String of ActionType.t ]) list ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t