View Source Flowy.Support.OAuth (Flowy v0.1.1)

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

This function is responsible for building the OAuth client.

Link to this function

build(client_id, client_secret, audience, site, token_url)

View Source
Link to this function

get_access_token(client)

View Source
@spec get_access_token(Flowy.Support.OAuth.Client.t()) :: String.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.