GuardianFirebase v0.1.0 GuardianFirebase.Token View Source

Implements Guardian’s Token behavior for Firebase tokens

Link to this section Summary

Functions

Builds the default claims for all new Firebase tokens

Create a token. Uses the claims, encodes and signs the token. The signing secret will be found first from the options. If not specified the secret key from the configuration will be used. Configuration:

  • secret_key The secret key to use for signing Options:
  • secret The secret key to use for signing
  • headers The Jose headers that should be used The secret may be in the form of any resolved value from Guardian.Config

Decodes the token and validates the signature

Exchanging a Firebase token is not implemented

Inspect the JWT without any validation or signature checking. Return an map with keys: headers and claims

Refreshing a Firebase token is not implemented

Revoking a Firebase token does not do anything

Generate unique token id

Link to this section Functions

Link to this function build_claims(mod, resource, sub, claims \\ %{}, options \\ []) View Source

Builds the default claims for all new Firebase tokens.

Link to this function create_token(mod, claims, options \\ []) View Source

Create a token. Uses the claims, encodes and signs the token. The signing secret will be found first from the options. If not specified the secret key from the configuration will be used. Configuration:

  • secret_key The secret key to use for signing Options:
  • secret The secret key to use for signing
  • headers The Jose headers that should be used The secret may be in the form of any resolved value from Guardian.Config
Link to this function decode_token(mod, token, options \\ []) View Source

Decodes the token and validates the signature.

Link to this function exchange(mod, old_token, from_type, to_type, options) View Source

Exchanging a Firebase token is not implemented.

Inspect the JWT without any validation or signature checking. Return an map with keys: headers and claims

Link to this function refresh(mod, old_token, options) View Source

Refreshing a Firebase token is not implemented.

Link to this function revoke(mod, claims, token, options) View Source

Revoking a Firebase token does not do anything.

Generate unique token id

Link to this function verify_claims(mod, claims, options) View Source

Verifies the claims.