Class: Scim::Kit::V2::ServiceProviderConfiguration
- Inherits:
-
Object
- Object
- Scim::Kit::V2::ServiceProviderConfiguration
show all
- Includes:
- Templatable
- Defined in:
- lib/scim/kit/v2/service_provider_configuration.rb
Overview
Represents a scim Service Provider Configuration
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#as_json, #render, #template_name, #to_h, #to_json
Constructor Details
#initialize(location:, meta: Meta.new('ServiceProviderConfig', location)) ⇒ ServiceProviderConfiguration
Returns a new instance of ServiceProviderConfiguration.
Instance Attribute Details
#authentication_schemes ⇒ Object
12
13
14
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 12
def authentication_schemes
@authentication_schemes
end
|
#bulk ⇒ Object
9
10
11
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 9
def bulk
@bulk
end
|
#change_password ⇒ Object
10
11
12
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 10
def change_password
@change_password
end
|
#documentation_uri ⇒ Object
11
12
13
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 11
def documentation_uri
@documentation_uri
end
|
#etag ⇒ Object
10
11
12
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 10
def etag
@etag
end
|
#filter ⇒ Object
9
10
11
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 9
def filter
@filter
end
|
11
12
13
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 11
def meta
@meta
end
|
#patch ⇒ Object
10
11
12
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 10
def patch
@patch
end
|
#sort ⇒ Object
10
11
12
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 10
def sort
@sort
end
|
Class Method Details
.parse(json, hash = JSON.parse(json, symbolize_names: true)) ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 35
def parse(json, hash = JSON.parse(json, symbolize_names: true))
x = new(location: hash[:location], meta: Meta.from(hash[:meta]))
x.documentation_uri = hash[:documentationUri]
%i[patch changePassword sort etag filter bulk].each do |key|
x.send("#{key.to_s.underscore}=", Supportable.from(hash[key]))
end
schemes = hash[:authenticationSchemes]
x.authentication_schemes = schemes&.map do |auth|
AuthenticationScheme.from(auth)
end
x
end
|
Instance Method Details
#add_authentication(type, primary: nil) {|scheme| ... } ⇒ Object
28
29
30
31
32
|
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 28
def add_authentication(type, primary: nil)
scheme = AuthenticationScheme.build_for(type, primary: primary)
yield scheme if block_given?
@authentication_schemes << scheme
end
|