plug_mishka_auth v0.0.2 MishkaAuth View Source

Link to this section Summary

Link to this section Functions

Specs

callback_url(Plug.Conn.t()) :: binary()
Link to this function

get_config_info(parametr)

View Source

Specs

get_config_info(atom()) :: any()
Link to this function

handle_callback(conn, module_name, path, code, provider)

View Source

Specs

handle_callback(
  Plug.Conn.t(),
  any(),
  atom() | String.t(),
  binary(),
  atom() | String.t()
) :: Plug.Conn.t()
Link to this function

handle_social(conn, auth, status, strategy)

View Source

Specs

handle_social(
  Plug.Conn.t(),
  %{
    :__struct__ => Ueberauth.Auth | Ueberauth.Failure,
    :provider => atom() | String.t(),
    :strategy => atom() | String.t(),
    optional(:credentials) => any(),
    optional(:errors) => any(),
    optional(:extra) => any(),
    optional(:info) => any(),
    optional(:uid) => any()
  },
  :auth | :fails,
  atom()
) :: Plug.Conn.t()
Link to this function

login_with_email(strategy, conn, email, password)

View Source

Specs

login_with_email(
  :current_token | :current_user | :refresh_token,
  Plug.Conn.t(),
  binary(),
  binary()
) :: Plug.Conn.t()
Link to this function

login_with_username(strategy, conn, username, password)

View Source

Specs

login_with_username(
  :current_token | :current_user | :refresh_token,
  Plug.Conn.t(),
  binary(),
  binary()
) :: Plug.Conn.t()
Link to this function

revoke_token(user_id, strategy)

View Source

Specs

revoke_token(any(), :access_token | :all_token | :refresh_token | :user_token) ::
  [any()]
  | {:error, :get_all_fields_of_record_redis, <<_::256>>}
  | {:ok, :delete_record_of_redis, <<_::168>>}
Link to this function

verify_and_update_current_token_with_getting_session(conn, atom)

View Source

Specs

verify_and_update_current_token_with_getting_session(
  Plug.Conn.t(),
  :current_token
) :: Plug.Conn.t()
Link to this function

verify_and_update_token(conn, refresh_token, atom)

View Source

Specs

verify_and_update_token(
  Plug.Conn.t(),
  binary(),
  :current_token | :refresh_token
) :: Plug.Conn.t()
Link to this function

verify_and_update_token(conn, refresh_token, access_token, atom)

View Source

Specs

verify_and_update_token(Plug.Conn.t(), binary(), any(), :refresh_token) ::
  Plug.Conn.t()
Link to this function

verify_token(refresh_token, atom)

View Source

Specs

verify_token(binary(), :access_token | :current_token | :refresh_token) ::
  {:error, :verify_token, :access_token | :current_token | :refresh_token}
  | {:ok, :verify_token, :access_token | :current_token | :refresh_token,
     binary()}
Link to this function

verify_token(refresh_token, access_token, atom)

View Source

Specs

verify_token(binary(), binary(), :refresh_token) ::
  {:error, :verify_token, :access_token | :refresh_token}
  | {:ok, :verify_token, :refresh_token_and_access_token, binary()}