WardrikOAuth. Browser
(wardrik_oauth v0.1.0-rc.1)
Copy Markdown
Browser sign-in: the authorization code flow with PKCE, on the service's own page.
Summary
Functions
Exchanges the code a principal came back with for a token.
Returns whether a callback's iss matches the issuer, or may be absent.
Builds the URL that starts a sign-in, with its state and PKCE verifier.
Functions
@spec exchange( WardrikOAuth.Metadata.t(), WardrikOAuth.Provider.t(), String.t(), String.t(), keyword() ) :: {:ok, WardrikOAuth.Token.t()} | {:error, term()}
Exchanges the code a principal came back with for a token.
@spec issued_by?(WardrikOAuth.Metadata.t(), String.t() | nil) :: boolean()
Returns whether a callback's iss matches the issuer, or may be absent.
@spec start(WardrikOAuth.Metadata.t(), WardrikOAuth.Provider.t(), String.t()) :: {:ok, %{url: String.t(), state: String.t(), verifier: String.t()}} | {:error, term()}
Builds the URL that starts a sign-in, with its state and PKCE verifier.