WardrikOAuth.Flow (wardrik_oauth v0.1.0-rc.1)

Copy Markdown

A process for one sign-in under way. It ends when the principal finishes, or after 15 minutes.

Summary

Functions

Returns the sign-in URL for provider and principal, starting a flow if none is running.

Returns a specification to start this module under a supervisor.

Describes the flow, for a page or CLI to show.

Finishes a browser flow with its callback's params.

Functions

begin(settings, provider, principal)

@spec begin(map(), WardrikOAuth.Provider.t(), WardrikCore.Principal.t()) ::
  {:authorize, String.t()} | {:error, term()}

Returns the sign-in URL for provider and principal, starting a flow if none is running.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

describe(pid)

@spec describe(pid()) :: map()

Describes the flow, for a page or CLI to show.

finish(pid, params)

@spec finish(pid(), map()) :: {:ok, String.t()} | {:error, term()}

Finishes a browser flow with its callback's params.