class

PlaceOS::Model::LdapAuthentication

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-ldap

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, }

see: https://github.com/omniauth/omniauth-ldap

Log = ::Log.for(self)

see: https://github.com/omniauth/omniauth-ldap

PRIMARY_KEY_TYPES = {:id => (String | Nil)} of Nil => Nil

macro level key => type

PRIMARY_KEYS = [{:id}]

see: https://github.com/omniauth/omniauth-ldap

Constructors

from_json(string_or_io : String | IO, trusted : Bool = false) : self

see: https://github.com/omniauth/omniauth-ldap

from_json(string_or_io : String | IO, root : String, trusted : Bool = false) : self

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">
from_trusted_json(string_or_io : String | IO, root : String) : self

see: https://github.com/omniauth/omniauth-ldap

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

see: https://github.com/omniauth/omniauth-ldap

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)

see: https://github.com/omniauth/omniauth-ldap

Source
new(pull : JSON::PullParser)

see: https://github.com/omniauth/omniauth-ldap

Source
new(rs : DB::ResultSet)

see: https://github.com/omniauth/omniauth-ldap

new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, port : Int32 | ActiveModel::Model::None = ::ActiveModel::Model::None.new, auth_method : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, uid : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, host : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, base : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, bind_dn : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, password : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, filter : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, authority_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new)

see: https://github.com/omniauth/omniauth-ldap

new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Initialize PlaceOS::Model::LdapAuthentication from HTTP::Params.

Class methods

attributes

Returns all attribute keys.

by_authority_id(id)

Look up instances of this model dependent on the foreign key

Source
changes(id : String | 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

see: https://github.com/omniauth/omniauth-ldap

from_rs(__temp_1875 : DB::ResultSet)

see: https://github.com/omniauth/omniauth-ldap

on_error(err : Exception | IO::Error)

see: https://github.com/omniauth/omniauth-ldap

primary_key

see: https://github.com/omniauth/omniauth-ldap

Source
table_name

see: https://github.com/omniauth/omniauth-ldap

Instance methods

__authority
__authority=(__authority : Authority | Nil)
after_create

see: https://github.com/omniauth/omniauth-ldap

after_destroy

see: https://github.com/omniauth/omniauth-ldap

after_initialize(trusted : Bool)

see: https://github.com/omniauth/omniauth-ldap

after_save

see: https://github.com/omniauth/omniauth-ldap

after_update

see: https://github.com/omniauth/omniauth-ldap

apply_defaults

Generate code to apply default values

assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, name : String | Missing = Missing, port : Int32 | Missing = Missing, auth_method : String | Missing = Missing, uid : String | Missing = Missing, host : String | Missing = Missing, base : String | Missing = Missing, bind_dn : String | Nil | Missing = Missing, password : String | Nil | Missing = Missing, filter : String | Nil | Missing = Missing, authority_id : String | Nil | Missing = Missing, id : String | Nil | Missing = Missing)

Assign to multiple attributes.

assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Assign to multiple attributes via HTTP::Params.

assign_attributes(model : PlaceOS::Model::LdapAuthentication)

Assign to multiple attributes from a model object

assign_attributes_from_json(json, root : String)

see: https://github.com/omniauth/omniauth-ldap

assign_attributes_from_json(json)

see: https://github.com/omniauth/omniauth-ldap

assign_attributes_from_trusted_json(json, root : String)

see: https://github.com/omniauth/omniauth-ldap

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)

see: https://github.com/omniauth/omniauth-ldap

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.

auth_method

auth_method getter

auth_method=(value : String)

auth_method setter

auth_method?

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.

auth_method_assigned?

see: https://github.com/omniauth/omniauth-ldap

auth_method_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

auth_method_changed?

see: https://github.com/omniauth/omniauth-ldap

auth_method_default

auth_method's default value

Source
auth_method_present?

One of "plain", "ssl", "tls"

auth_method_removed?

see: https://github.com/omniauth/omniauth-ldap

auth_method_was

see: https://github.com/omniauth/omniauth-ldap

auth_method_will_change!

Include auth_method in the set of changed attributes, whether it has changed or not.

authority

Retrieves the parent relationship

Source
authority!
Source
authority=(parent : Authority)

Sets the parent relationship

Source
authority_id

authority_id getter

authority_id=(value : String | Nil)

authority_id setter

authority_id_assigned?

see: https://github.com/omniauth/omniauth-ldap

authority_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

authority_id_changed?

see: https://github.com/omniauth/omniauth-ldap

authority_id_default

authority_id's default value

authority_id_present?
authority_id_removed?

see: https://github.com/omniauth/omniauth-ldap

authority_id_was

see: https://github.com/omniauth/omniauth-ldap

authority_id_will_change!

Include authority_id in the set of changed attributes, whether it has changed or not.

base

base getter

base=(value : String)

base setter

base?

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.

base_assigned?

see: https://github.com/omniauth/omniauth-ldap

base_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

base_changed?

see: https://github.com/omniauth/omniauth-ldap

base_default

base's default value

Source
base_present?

BaseDN such as dc=intridea, dc=com

base_removed?

see: https://github.com/omniauth/omniauth-ldap

base_was

see: https://github.com/omniauth/omniauth-ldap

base_will_change!

Include base in the set of changed attributes, whether it has changed or not.

before_create

see: https://github.com/omniauth/omniauth-ldap

before_destroy

see: https://github.com/omniauth/omniauth-ldap

before_save

see: https://github.com/omniauth/omniauth-ldap

before_update

see: https://github.com/omniauth/omniauth-ldap

bind_dn

bind_dn getter

bind_dn=(value : String | Nil)

bind_dn setter

bind_dn_assigned?

see: https://github.com/omniauth/omniauth-ldap

bind_dn_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

bind_dn_changed?

see: https://github.com/omniauth/omniauth-ldap

bind_dn_default

bind_dn's default value

Source
bind_dn_present?

bind_dn and password are the default credentials to perform user lookups

bind_dn_removed?

see: https://github.com/omniauth/omniauth-ldap

bind_dn_was

see: https://github.com/omniauth/omniauth-ldap

bind_dn_will_change!

Include bind_dn 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

see: https://github.com/omniauth/omniauth-ldap

changed_yaml(io : IO) : Nil

Serialize the set of changed attributes to YAML.

changed_yaml

Serialize the set of changed attributes to YAML.

clear_changes_information

Reset changes for all attributes.

created_at

created_at getter

created_at=(value : Time)

Setters created_at setter

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?

see: https://github.com/omniauth/omniauth-ldap

created_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

created_at_changed?

see: https://github.com/omniauth/omniauth-ldap

created_at_default

created_at's default value

created_at_present?
created_at_removed?

see: https://github.com/omniauth/omniauth-ldap

created_at_was

see: https://github.com/omniauth/omniauth-ldap

created_at_will_change!

Include created_at in the set of changed attributes, whether it has changed or not.

filter

filter getter

filter=(value : String | Nil)

filter setter

filter_assigned?

see: https://github.com/omniauth/omniauth-ldap

filter_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

filter_changed?

see: https://github.com/omniauth/omniauth-ldap

filter_default

filter's default value

Source
filter_present?

LDAP filter like: (&(uid=%{username})(memberOf=cn=myapp-users,ou=groups,dc=example,dc=com)) Can be used instead of uid

filter_removed?

see: https://github.com/omniauth/omniauth-ldap

filter_was

see: https://github.com/omniauth/omniauth-ldap

filter_will_change!

Include filter in the set of changed attributes, whether it has changed or not.

host

host getter

host=(value : String)

host setter

host?

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.

host_assigned?

see: https://github.com/omniauth/omniauth-ldap

host_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

host_changed?

see: https://github.com/omniauth/omniauth-ldap

host_default

host's default value

Source
host_present?
host_removed?

see: https://github.com/omniauth/omniauth-ldap

host_was

see: https://github.com/omniauth/omniauth-ldap

host_will_change!

Include host in the set of changed attributes, whether it has changed or not.

id

id getter

id=(value : String | Nil)

id setter

id?

see: https://github.com/omniauth/omniauth-ldap

id_assigned?

see: https://github.com/omniauth/omniauth-ldap

id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

id_changed?

see: https://github.com/omniauth/omniauth-ldap

id_default

id's default value

id_present?

see: https://github.com/omniauth/omniauth-ldap

id_removed?

see: https://github.com/omniauth/omniauth-ldap

id_was

see: https://github.com/omniauth/omniauth-ldap

id_will_change!

Include id in the set of changed attributes, whether it has changed or not.

invoke_props

see: https://github.com/omniauth/omniauth-ldap

name

name getter

name=(value : String)

name setter

name?

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.

name_assigned?

see: https://github.com/omniauth/omniauth-ldap

name_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

name_changed?

see: https://github.com/omniauth/omniauth-ldap

name_default

name's default value

Source
name_present?
name_removed?

see: https://github.com/omniauth/omniauth-ldap

name_was

see: https://github.com/omniauth/omniauth-ldap

name_will_change!

Include name in the set of changed attributes, whether it has changed or not.

password

password getter

password=(value : String | Nil)

password setter

password_assigned?

see: https://github.com/omniauth/omniauth-ldap

password_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

password_changed?

see: https://github.com/omniauth/omniauth-ldap

password_default

password's default value

Source
password_present?

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.

password_removed?

see: https://github.com/omniauth/omniauth-ldap

password_was

see: https://github.com/omniauth/omniauth-ldap

password_will_change!

Include password in the set of changed attributes, whether it has changed or not.

persistent_attributes

see: https://github.com/omniauth/omniauth-ldap

port

port getter

port=(value : Int32)

port setter

port?

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.

port_assigned?

see: https://github.com/omniauth/omniauth-ldap

port_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

port_changed?

see: https://github.com/omniauth/omniauth-ldap

port_default

port's default value

Source
port_present?
port_removed?

see: https://github.com/omniauth/omniauth-ldap

port_was

see: https://github.com/omniauth/omniauth-ldap

port_will_change!

Include port in the set of changed attributes, whether it has changed or not.

primary_key

see: https://github.com/omniauth/omniauth-ldap

Source
primary_key_hash

see: https://github.com/omniauth/omniauth-ldap

reset_associations
Source
restore_attributes

Reset each attribute to their previous values and clears all changes.

table_name

see: https://github.com/omniauth/omniauth-ldap

uid

uid getter

uid=(value : String)

uid setter

uid?

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.

uid_assigned?

see: https://github.com/omniauth/omniauth-ldap

uid_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

uid_changed?

see: https://github.com/omniauth/omniauth-ldap

uid_default

uid's default value

Source
uid_present?
uid_removed?

see: https://github.com/omniauth/omniauth-ldap

uid_was

see: https://github.com/omniauth/omniauth-ldap

uid_will_change!

Include uid in the set of changed attributes, whether it has changed or not.

updated_at

updated_at getter

updated_at=(value : Time)

updated_at setter

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?

see: https://github.com/omniauth/omniauth-ldap

updated_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

updated_at_changed?

see: https://github.com/omniauth/omniauth-ldap

updated_at_default

updated_at's default value

updated_at_present?
updated_at_removed?

see: https://github.com/omniauth/omniauth-ldap

updated_at_was

see: https://github.com/omniauth/omniauth-ldap

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.

Nested types