vgno / okta-elixir

Okta interface written in Elixir.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OktaElixir

Okta interface written in Elixir. Currently only supporting authentication (OpenID/OAuth V2).

Methods

short_token_url/0 -> String

Generates URL from which you receive a short-lived access token.

exchange_short_token/1 (token: String) -> %{}

Returns a struct containing tokens, expires_in, and metadata.

%{
  "access_token" => String,
  "expires_in" => Integer,
  "id_token" => String,
  "scope" => String,
  "token_type" => String
}

verify_token/1 (token: String) -> Boolean

Checks if the token provided is valid.

Installation

Add okta_elixir to your list of dependencies in mix.exs:

def deps do
  [
    {:okta_elixir, "~> 0.2.0"}
  ]
end

Add the required configuration to config/config.exs.

config :okta_auth,
  domain: "",
  redirect_uri: "",
  client_id: "",
  client_secret: ""

About

Okta interface written in Elixir.


Languages

Language:Elixir 100.0%