Class: Koi::Identity::Member

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model
Defined in:
app/models/koi/identity/member.rb

Overview

A named trust rule from config: pairs a provider and an exact subject with the scope a verified assertion may act as.

Constant Summary collapse

SCOPES =
%r{\Aadmin/user\z|\Aadmin/role/(?<slug>[a-z0-9_]+)\z}

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#provider_namesObject

Provider names declared in config, for cross-checking references.



19
20
21
# File 'app/models/koi/identity/member.rb', line 19

def provider_names
  @provider_names
end

Instance Method Details

#role_slugObject



25
26
27
# File 'app/models/koi/identity/member.rb', line 25

def role_slug
  scope&.[](SCOPES, :slug)
end