View Source oidcc_scope (Oidcc v3.0.0-alpha.1)

OpenID Scope Utilities

Link to this section Summary

Link to this section Types

-type scopes() :: [nonempty_binary() | atom() | nonempty_string()].
-type t() :: binary().

Link to this section Functions

-spec parse(Scope :: t()) -> scopes().

Parse t() into scopes()

examples

Examples

  [<<"openid">>, <<"profile">>] = oidcc_scope:parse(<<"openid profile">>).
-spec scopes_to_bin(Scopes :: scopes()) -> t().

Compose scopes() into t()

examples

Examples

  <<"openid profile email">> = oidcc_scope:scopes_to_bin(
    [<<"openid">>, profile, "email"]).