View Source MyApp.CharonOauth2.Authorization (CharonOauth2 v0.0.5)
An authorization represents the permission granted by a resource owner (usually a user) to an application to act on their behalf within certain limits (determined by scopes).
Field :scope
is guaranteed to be an ordset (:ordsets
).
Link to this section Summary
Functions
Basic changeset.
Insert-only changeset - some things (should) never change.
Returns a new query with the current module as named binding :charon_oauth2_authorization
.
Preload named bindings. Automatically joins using resolve_binding/2
.
Resolve named bindings that are not present in the query by (left-)joining to the appropriate tables.
Link to this section Types
@type resolvable() ::
:resource_owner
| :resource_owner_grants
| :client
| :client_owner
| :grants
| :grants_resource_owner
Bindings / preloads that can be used with resolve_binding/2
and preload/2
Link to this section Functions
@spec changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()
Basic changeset.
@spec insert_only_changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()
Insert-only changeset - some things (should) never change.
@spec named_binding() :: Ecto.Query.t()
Returns a new query with the current module as named binding :charon_oauth2_authorization
.
@spec preload(Ecto.Query.t(), resolvable() | [resolvable()]) :: Ecto.Query.t()
Preload named bindings. Automatically joins using resolve_binding/2
.
@spec resolve_binding(Ecto.Query.t(), resolvable()) :: Ecto.Query.t()
Resolve named bindings that are not present in the query by (left-)joining to the appropriate tables.