okta_api v0.1.10 Okta.Plug.EventHook View Source

This Plug handles Okta Event Hooks.

It validates the incoming requests:

And forward the command to the Okta.Event.HookHandler.

Also implements Event Hooks verifications

Usage

Using Plug.Router

forward "/okta/event-hooks", to: Okta.Plug.EventHook, [
  event_handler: MyModule,
  secret_key: "my secret key"
]

Using in Phoenix.Router

forward "/slack", Okta.Plug.EventHook, [
  event_handler: MyModule,
  secret_key: "my secret key"
]

Configuration

  • event_handler: A module that implements Okta.EventHookHandler behaviour.
  • secret_key: The secret key to validate the incoming requests. You could use mfa configuration as well.

Link to this section Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this section Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.