PolarExpress.OAuth (polar_express v0.1.5)

Copy Markdown View Source

Polar OAuth2 convenience helpers.

Delegates to the generated PolarExpress.Services.Oauth2Service.

Usage

client = PolarExpress.client("pk_test_...")

# Exchange code for token
{:ok, resp} = PolarExpress.OAuth.token(client, %{"grant_type" => "authorization_code", "code" => "ac_..."})

# Revoke a token
{:ok, resp} = PolarExpress.OAuth.revoke(client, %{"token" => "polar_at_..."})

# Introspect a token
{:ok, resp} = PolarExpress.OAuth.introspect(client, %{"token" => "polar_at_..."})

Summary

Functions

introspect(client, params \\ %{}, opts \\ [])

See PolarExpress.Services.Oauth2Service.introspect_token/3.

revoke(client, params \\ %{}, opts \\ [])

See PolarExpress.Services.Oauth2Service.revoke_token/3.

token(client, params \\ %{}, opts \\ [])

See PolarExpress.Services.Oauth2Service.request_token/3.