See: https://github.com/omniauth/omniauth-oauth2
PlaceOS::Model::OAuthAuthentication
Inherits PlaceOS::Model::Timestamps < PlaceOS::Model::ModelBase < PlaceOS::Model::Associations < Neuroplastic < PgORM::Base < PgORM::Validators < PgORM::Table < PgORM::Persistence < PgORM::Associations < ActiveModel::Callbacks < ActiveModel::Validation < ActiveModel::Model < DB::Mappable < DB::Serializable < YAML::Serializable < JSON::Serializable < Reference < Object
See: https://github.com/omniauth/omniauth-oauth2
Constants
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
macro level key => type
See: https://github.com/omniauth/omniauth-oauth2
Constructors
See: https://github.com/omniauth/omniauth-oauth2
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">
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Class methods
Returns all attribute keys.
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.
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Instance methods
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Generate code to apply default values
Assign to multiple attributes.
Assign to multiple attributes via HTTP::Params.
Assign to multiple attributes from a model object
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Assign each field from JSON if field exists in JSON and has changed in model
See: https://github.com/omniauth/omniauth-oauth2
Uses the YAML parser as JSON is valid YAML
Returns a Hash of all attribute values
Returns a NamedTuple of all attribute values.
auth_scheme getter
auth_scheme setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
If not set it defaults to "request_body", others include "basic_auth"
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include auth_scheme in the set of changed attributes, whether it has changed or not.
authority_id getter
authority_id setter
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
authority_id's default value
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include authority_id in the set of changed attributes, whether it has changed or not.
authorize_params getter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
Maps additional params to be added to the authorisation request
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include authorize_params in the set of changed attributes, whether it has changed or not.
authorize_url getter
authorize_url setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
The SSO providers URL for authorization, defaults to: oauth/authorize
Google is /o/oauth2/auth
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include authorize_url in the set of changed attributes, whether it has changed or not.
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Check if any attributes have changed.
Returns a Hash with all changed attributes.
Serialize the set of changed attributes to JSON.
Serialize the set of changed attributes to JSON.
See: https://github.com/omniauth/omniauth-oauth2
Serialize the set of changed attributes to YAML.
Serialize the set of changed attributes to YAML.
Reset changes for all attributes.
client_id getter
client_id setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
The client ID configured for this application
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include client_id in the set of changed attributes, whether it has changed or not.
client_secret getter
client_secret setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
The secret configured for this application
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include client_secret in the set of changed attributes, whether it has changed or not.
created_at getter
Setters
created_at setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
created_at's default value
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include created_at in the set of changed attributes, whether it has changed or not.
ensure_matching getter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
Security checks to be made on the returned data
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include ensure_matching in the set of changed attributes, whether it has changed or not.
id getter
id setter
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
id's default value
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include id in the set of changed attributes, whether it has changed or not.
info_mappings getter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
Maps an expected key to a provided key i.e. {used_in_engine => used_by_remote}
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include info_mappings in the set of changed attributes, whether it has changed or not.
See: https://github.com/omniauth/omniauth-oauth2
name getter
name setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include name in the set of changed attributes, whether it has changed or not.
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
raw_info_url getter
raw_info_url setter
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
URL to call with a valid token to obtain the users profile data (name, email etc)
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include raw_info_url in the set of changed attributes, whether it has changed or not.
Reset each attribute to their previous values and clears all changes.
scope getter
scope setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
Space separated scope strings
i.e. https://www.googleapis.com/auth/devstorage.readonly https://www.googleapis.com/auth/prediction
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include scope in the set of changed attributes, whether it has changed or not.
site getter
site setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
The HTTP URL of the SSO provider
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include site in the set of changed attributes, whether it has changed or not.
See: https://github.com/omniauth/omniauth-oauth2
token_method getter
token_method setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
If not set it defaults to "post"
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include token_method in the set of changed attributes, whether it has changed or not.
token_url getter
token_url setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
defaults to: oauth/token however google is: /o/oauth2/token
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include token_url in the set of changed attributes, whether it has changed or not.
updated_at getter
updated_at setter
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.
See: https://github.com/omniauth/omniauth-oauth2
Returns a Tuple of the previous and the current value of an instance variable if it has changed
See: https://github.com/omniauth/omniauth-oauth2
updated_at's default value
See: https://github.com/omniauth/omniauth-oauth2
See: https://github.com/omniauth/omniauth-oauth2
Include updated_at in the set of changed attributes, whether it has changed or not.
Validate that all non-nillable fields have values.