ExOauth2Provider v0.5.0 ExOauth2Provider.Scopes View Source

Functions for dealing with scopes.

Link to this section Summary

Functions

Check if required scopes exists in the scopes list

Will default to server scopes if no scopes supplied

Check if two lists of scopes are equal

Filter defaults scopes from scopes list

Fetch scopes from an access token

Convert scopes string to list

Convert scopes list to string

Link to this section Functions

Link to this function

all?(scopes, required_scopes) View Source
all?([binary()], [binary()]) :: boolean()

Check if required scopes exists in the scopes list

Link to this function

default_to_server_scopes(server_scopes, config) View Source
default_to_server_scopes([binary()], keyword()) :: [binary()]

Will default to server scopes if no scopes supplied

Link to this function

equal?(scopes, other_scopes) View Source
equal?([binary()], [binary()]) :: boolean()

Check if two lists of scopes are equal

Link to this function

filter_default_scopes(scopes, config) View Source
filter_default_scopes([binary()], keyword()) :: [binary()]

Filter defaults scopes from scopes list

Link to this function

from_access_token(access_token) View Source
from_access_token(map()) :: [binary()]

Fetch scopes from an access token

Link to this function

to_list(str) View Source
to_list(binary()) :: [binary()]

Convert scopes string to list

Link to this function

to_string(scopes) View Source
to_string(list()) :: binary()

Convert scopes list to string