Class: Scim::Kit::V2::ServiceProviderConfiguration

Inherits:
Object
  • Object
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

Instance Method Summary collapse

Methods included from Templatable

#as_json, #render, #template_name, #to_h, #to_json

Constructor Details

#initialize(location:) ⇒ ServiceProviderConfiguration

Returns a new instance of ServiceProviderConfiguration.



15
16
17
18
19
20
21
22
23
24
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 15

def initialize(location:)
  @meta = Meta.new('ServiceProviderConfig', location)
  @authentication_schemes = []
  @etag = Supportable.new
  @sort = Supportable.new
  @change_password = Supportable.new
  @patch = Supportable.new
  @bulk = Supportable.new(:max_operations, :max_payload_size)
  @filter = Supportable.new(:max_results)
end

Instance Attribute Details

#authentication_schemesObject (readonly)

Returns the value of attribute authentication_schemes.



11
12
13
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 11

def authentication_schemes
  @authentication_schemes
end

#bulkObject (readonly)

Returns the value of attribute bulk.



13
14
15
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 13

def bulk
  @bulk
end

#change_passwordObject (readonly)

Returns the value of attribute change_password.



12
13
14
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 12

def change_password
  @change_password
end

#documentation_uriObject

Returns the value of attribute documentation_uri.



10
11
12
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 10

def documentation_uri
  @documentation_uri
end

#etagObject (readonly)

Returns the value of attribute etag.



12
13
14
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 12

def etag
  @etag
end

#filterObject (readonly)

Returns the value of attribute filter.



13
14
15
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 13

def filter
  @filter
end

#locationObject (readonly)

Returns the value of attribute location.



9
10
11
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 9

def location
  @location
end

#metaObject (readonly)

Returns the value of attribute meta.



13
14
15
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 13

def meta
  @meta
end

#patchObject (readonly)

Returns the value of attribute patch.



12
13
14
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 12

def patch
  @patch
end

#sortObject (readonly)

Returns the value of attribute sort.



12
13
14
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 12

def sort
  @sort
end

Instance Method Details

#add_authentication(type, primary: nil) {|scheme| ... } ⇒ Object

Yields:

  • (scheme)


26
27
28
29
30
# File 'lib/scim/kit/v2/service_provider_configuration.rb', line 26

def add_authentication(type, primary: nil)
  scheme = AuthenticationScheme.build_for(type, primary: primary)
  yield scheme if block_given?
  @authentication_schemes << scheme
end