View Source Flowy.Support.OAuth (Flowy v0.1.4)
This module is responsible for managing the OAuth clients.
Configuration
config :flowy, :oauth,
site: "https://hydra.mysite.net",
clients: [
%{
client_id: System.get_env("APP_CLIENT_ID"),
client_secret: System.get_env("APP_SECRET"),
audience: System.get_env(" APP_AUDIENCE"),
token_url: "/oauth2/token",
scopes: []
}
]
Summary
Functions
This function is responsible for building the OAuth client.
This function is responsible for getting the access token from the OAuth server. When the client already have an access token, it will check if the token is expired.
Functions
@spec build(Flowy.Support.OAuth.Client.t()) :: Flowy.Support.OAuth.Client.t()
This function is responsible for building the OAuth client.
@spec get_access_token(Flowy.Support.OAuth.Client.t()) :: String.t()
@spec get_token(Flowy.Support.OAuth.Client.t()) :: OAuth2.AccessToken.t()
@spec get_token(Flowy.Support.OAuth.Client.t()) :: OAuth2.AccessToken.t()
This function is responsible for getting the access token from the OAuth server. When the client already have an access token, it will check if the token is expired.