Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Constants
CALLBACKS = {
before_save: [] of
Nil,
after_save: [] of
Nil,
before_create: [do
self.created_at = self.updated_at =
Time.utc
end] of
Nil,
after_create: [] of
Nil,
before_update: [do
self.updated_at =
Time.utc
end] of
Nil,
after_update: [] of
Nil,
before_destroy: [] of
Nil,
after_destroy: [] of
Nil,
}
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
PRIMARY_KEY_TYPES = {:id => (
Int64 |
Nil)} of
Nil =>
NilPRIMARY_KEYS = [{:id}]
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Constructors
from_json(string_or_io :
String |
IO, trusted :
Bool = false) : self
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Deserializes the given JSON in string_or_io into
an instance of self, assuming the JSON consists
of an JSON object with key root, and whose value is
the value to deserialize. Will not deserialise from
fields with mass_assign: false
class User < ActiveModel::Model
attribute name : String
attribute google_id : UUID, mass_assign: false
end
User.from_json(%({"main": {"name": "Jason", "google_id": "f6f70bfb-c882-446d-8758-7ce47db39620"}}), root: "main") # => #<User:0x103131b20 @name="Jason">
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
from_trusted_json(string_or_io :
String |
IO) : self
Serialize from a trusted JSON source
from_trusted_yaml(string_or_io :
String |
IO) : self
Serialize from a trusted YAML source
from_yaml(string_or_io :
String |
IO, trusted :
Bool = false) : self
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
SourcePersistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Sourcenew(rs : DB::ResultSet)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
new(jti :
String |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, token_type :
String |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, client_id :
String |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, sub :
String |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, scope :
String |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, issued_at :
Int64 |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, expires_at :
Int64 |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, cert_thumbprint :
String |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, revoked_at :
Int64 |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, id :
Int64 |
Nil |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, created_at :
Time |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new, updated_at :
Time |
ActiveModel::Model::None = ::
ActiveModel::Model::None.new)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Initialize PlaceOS::Model::OAuthToken from HTTP::Params.
Class methods
attributes
Returns all attribute keys.
changes(id :
Int64 |
Nil |
Nil = nil) :
ChangeFeed Changefeed at row (if id passed) or whole table level.
Returns a ChangeFeed instance which can be used to invoke async callbacks via on or
use blocking Iterator via each method.
elastic
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
from_rs(__temp_2471 : DB::ResultSet)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
primary_key
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Sourcetable_name
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Instance methods
after_create
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
after_destroy
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
after_initialize(trusted :
Bool)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
after_save
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
after_update
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
apply_defaults
Generate code to apply default values
assign_attributes(jti :
String |
Missing =
Missing, token_type :
String |
Nil |
Missing =
Missing, client_id :
String |
Nil |
Missing =
Missing, sub :
String |
Nil |
Missing =
Missing, scope :
String |
Nil |
Missing =
Missing, issued_at :
Int64 |
Nil |
Missing =
Missing, expires_at :
Int64 |
Nil |
Missing =
Missing, cert_thumbprint :
String |
Nil |
Missing =
Missing, revoked_at :
Int64 |
Nil |
Missing =
Missing, id :
Int64 |
Nil |
Missing =
Missing, created_at :
Time |
Missing =
Missing, updated_at :
Time |
Missing =
Missing)
Assign to multiple attributes.
Assign to multiple attributes via HTTP::Params.
Assign to multiple attributes from a model object
assign_attributes_from_json(json, root :
String)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
assign_attributes_from_json(json)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
assign_attributes_from_trusted_json(json, root :
String)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
assign_attributes_from_trusted_json(json)
Assign each field from JSON if field exists in JSON and has changed in model
assign_attributes_from_trusted_yaml(yaml)
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
assign_attributes_from_yaml(yaml)
Uses the YAML parser as JSON is valid YAML
attributes
Returns a Hash of all attribute values
attributes_tuple
Returns a NamedTuple of all attribute values.
before_create
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
before_destroy
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
before_save
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
before_update
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
cert_thumbprint=(value :
String |
Nil)
cert_thumbprint_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
cert_thumbprint_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
cert_thumbprint_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
cert_thumbprint_default
cert_thumbprint's default value
Sourcecert_thumbprint_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
cert_thumbprint_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
cert_thumbprint_will_change!
Include cert_thumbprint in the set of changed attributes, whether it has changed or not.
changed?
Check if any attributes have changed.
changed_attributes
Returns a Hash with all changed attributes.
changed_json(io :
IO) :
Nil Serialize the set of changed attributes to JSON.
changed_json
Serialize the set of changed attributes to JSON.
changed_persist_attributes
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
changed_yaml(io :
IO) :
Nil Serialize the set of changed attributes to YAML.
changed_yaml
Serialize the set of changed attributes to YAML.
client_id=(value :
String |
Nil)
client_id_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
client_id_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
client_id_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
client_id_default
client_id's default value
Sourceclient_id_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
client_id_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
client_id_will_change!
Include client_id in the set of changed attributes, whether it has changed or not.
created_at=(value :
Time)
created_at?
NOTE: use getter / getter! (not property / property!) so that the
setter defined later in __create_initializer__ is the only setter on
the field. Crystal's overload resolution silently fails to replace a
property-defined setter with one of identical signature for generic
types (e.g. Set(String)?, Array(String)?, String | Array(String)),
although it does work for non-generic ones like String?. Defining the
setter only once via __create_initializer__ ensures change tracking,
sanitization, and custom setter blocks run uniformly across all types.
created_at_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
created_at_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
created_at_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
created_at_default
created_at's default value
created_at_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
created_at_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
created_at_will_change!
Include created_at in the set of changed attributes, whether it has changed or not.
expires_at=(value :
Int64 |
Nil)
expires_at_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
expires_at_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
expires_at_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
expires_at_default
expires_at's default value
Sourceexpires_at_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
expires_at_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
expires_at_will_change!
Include expires_at in the set of changed attributes, whether it has changed or not.
id?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
id_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
id_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
id_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
id_present?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
id_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
id_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
id_will_change!
Include id in the set of changed attributes, whether it has changed or not.
invoke_props
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
issued_at=(value :
Int64 |
Nil)
issued_at_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
issued_at_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
issued_at_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
issued_at_default
issued_at's default value
Sourceissued_at_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
issued_at_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
issued_at_will_change!
Include issued_at in the set of changed attributes, whether it has changed or not.
jti?
NOTE: use getter / getter! (not property / property!) so that the
setter defined later in __create_initializer__ is the only setter on
the field. Crystal's overload resolution silently fails to replace a
property-defined setter with one of identical signature for generic
types (e.g. Set(String)?, Array(String)?, String | Array(String)),
although it does work for non-generic ones like String?. Defining the
setter only once via __create_initializer__ ensures change tracking,
sanitization, and custom setter blocks run uniformly across all types.
jti_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
jti_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
jti_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
jti_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
jti_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
jti_will_change!
Include jti in the set of changed attributes, whether it has changed or not.
persistent_attributes
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
primary_key
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
Sourceprimary_key_hash
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
restore_attributes
Reset each attribute to their previous values and clears all changes.
revoke!
Stamps revoked_at to the current time (epoch seconds) and
saves. No-op if already revoked.
Sourcerevoked?
true if the token has been marked revoked via revoked_at.
Sourcerevoked_at=(value :
Int64 |
Nil)
revoked_at_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
revoked_at_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
revoked_at_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
revoked_at_default
revoked_at's default value
Sourcerevoked_at_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
revoked_at_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
revoked_at_will_change!
Include revoked_at in the set of changed attributes, whether it has changed or not.
scope_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
scope_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
scope_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
scope_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
scope_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
scope_will_change!
Include scope in the set of changed attributes, whether it has changed or not.
sub_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
sub_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
sub_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
sub_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
sub_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
sub_will_change!
Include sub in the set of changed attributes, whether it has changed or not.
table_name
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
token_type=(value :
String |
Nil)
token_type_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
token_type_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
token_type_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
token_type_default
token_type's default value
Sourcetoken_type_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
token_type_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
token_type_will_change!
Include token_type in the set of changed attributes, whether it has changed or not.
updated_at=(value :
Time)
updated_at?
NOTE: use getter / getter! (not property / property!) so that the
setter defined later in __create_initializer__ is the only setter on
the field. Crystal's overload resolution silently fails to replace a
property-defined setter with one of identical signature for generic
types (e.g. Set(String)?, Array(String)?, String | Array(String)),
although it does work for non-generic ones like String?. Defining the
setter only once via __create_initializer__ ensures change tracking,
sanitization, and custom setter blocks run uniformly across all types.
updated_at_assigned?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
updated_at_change
Returns a Tuple of the previous and the current
value of an instance variable if it has changed
updated_at_changed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
updated_at_default
updated_at's default value
updated_at_removed?
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
updated_at_was
Persistence backing for the auth.cr AuthlyAdapter::TokenStore.
Each row records the metadata of a single OAuth2 access or refresh
token; the revoked_at column lets the auth service mark a token
invalid without rotating signing keys.
See migration 20260519100000000_add_oauth_tokens.sql for the
column rationale (notably: most columns are nullable so a revoke
for a never-stored refresh token can still leave a marker).
updated_at_will_change!
Include updated_at in the set of changed attributes, whether it has changed or not.
validate_nilability
Validate that all non-nillable fields have values.