RestAuth v1.1.1 RestAuth.Authority View Source

An authority struct.

Used to hold information about the current user/authority granted.

Link to this section Summary

Types

t()

Roles defaults to an empty list. Anonymous defaults to true. Remember to set anonymous: false on successful creation of RestAuth.Authority in your handler!

Functions

Convenience function for transforming a map with binary keys to a RestAuth.Authority struct. Map keys not in the struct are silently dropped

Link to this section Types

Link to this type t() View Source
t() :: %RestAuth.Authority{anonymous: true | false, metadata: %{optional(String.t) => term}, roles: [String.t], token: String.t, user_id: Integer.t | any}

Roles defaults to an empty list. Anonymous defaults to true. Remember to set anonymous: false on successful creation of RestAuth.Authority in your handler!

Link to this section Functions

Link to this function from_binary_key_map(map) View Source

Convenience function for transforming a map with binary keys to a RestAuth.Authority struct. Map keys not in the struct are silently dropped.