Ory.Api.Api (ory_oathkeeper v0.40.2)

API calls for all endpoints tagged Api.

Link to this section Summary

Functions

Access Control Decision API

Retrieve a Rule Use this method to retrieve a rule from the storage. If it does not exist you will receive a 404 error.

Lists Cryptographic Keys This endpoint returns cryptographic keys that are required to, for example, verify signatures of ID Tokens.

List All Rules This method returns an array of all rules that are stored in the backend. This is useful if you want to get a full view of what rules you have currently in place.

Link to this section Functions

Link to this function

decisions(connection, opts \\ [])

@spec decisions(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:ok, Ory.Model.GenericError.t()} | {:error, Tesla.Env.t()}

Access Control Decision API

This endpoint works with all HTTP Methods (GET, POST, PUT, ...) and matches every path prefixed with /decisions. This endpoint mirrors the proxy capability of ORY Oathkeeper's proxy functionality but instead of forwarding the request to the upstream server, returns 200 (request should be allowed), 401 (unauthorized), or 403 (forbidden) status codes. This endpoint can be used to integrate with other API Proxies like Ambassador, Kong, Envoy, and many more.

parameters

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_rule(connection, id, opts \\ [])

@spec get_rule(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.Rule.t()}
  | {:ok, Ory.Model.GenericError.t()}
  | {:error, Tesla.Env.t()}

Retrieve a Rule Use this method to retrieve a rule from the storage. If it does not exist you will receive a 404 error.

parameters

Parameters

  • connection (Ory.Connection): Connection to server
  • id (String.t):
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, Ory.Model.Rule.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_well_known_json_web_keys(connection, opts \\ [])

@spec get_well_known_json_web_keys(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.GenericError.t()}
  | {:ok, Ory.Model.JsonWebKeySet.t()}
  | {:error, Tesla.Env.t()}

Lists Cryptographic Keys This endpoint returns cryptographic keys that are required to, for example, verify signatures of ID Tokens.

parameters

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, Ory.Model.JsonWebKeySet.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

list_rules(connection, opts \\ [])

@spec list_rules(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.GenericError.t()}
  | {:ok, [Ory.Model.Rule.t()]}
  | {:error, Tesla.Env.t()}

List All Rules This method returns an array of all rules that are stored in the backend. This is useful if you want to get a full view of what rules you have currently in place.

parameters

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :limit (integer()): The maximum amount of rules returned.
    • :offset (integer()): The offset from where to start looking.

returns

Returns

  • {:ok, [%Rule{}, ...]} on success
  • {:error, Tesla.Env.t} on failure