View Source Mobilizon.Service.Auth.Applications (Mobilizon v5.0.0-beta.1)
Module to handle applications management
Summary
Types
@type access_token_details() :: %{ access_token: String.t(), expires_in: pos_integer(), refresh_token: String.t(), refresh_token_expires_in: pos_integer(), scope: nil, token_type: String.t() }
Functions
@spec activate_device(String.t(), Mobilizon.Users.User.t()) :: {:ok, Mobilizon.Applications.ApplicationDeviceActivation.t()} | {:error, Ecto.Changeset.t()} | {:error, :not_found} | {:error, :expired}
@spec autorize(String.t(), String.t(), String.t(), integer()) :: {:ok, Mobilizon.Applications.ApplicationToken.t()} | {:error, :application_not_found} | {:error, :redirect_uri_not_in_allowed} | {:error, Ecto.Changeset.t()}
@spec autorize_device_application(String.t(), String.t()) :: {:ok, Mobilizon.Applications.ApplicationDeviceActivation.t()} | {:error, Ecto.Changeset.t()} | {:error, :expired} | {:error, :access_denied} | {:error, :not_found}
@spec create(String.t(), [String.t()], String.t(), String.t() | nil) :: {:ok, Mobilizon.Applications.Application.t()} | {:error, Ecto.Changeset.t()} | {:error, :invalid_scope}
Link to this function
generate_access_token(client_id, client_secret, code, redirect_uri, scope)
View Source@spec refresh_tokens(String.t(), String.t(), String.t()) :: {:ok, access_token_details()} | {:error, :invalid_client_credentials} | {:error, :invalid_refresh_token} | {:error, any()}
@spec register_device_code(String.t(), String.t() | nil) :: {:ok, Mobilizon.Applications.ApplicationDeviceActivation.t()} | {:error, :application_not_found} | {:error, :scope_not_included} | {:error, Ecto.Changeset.t()}