Method: Scimitar::ServiceProviderConfiguration#initialize

Defined in:
app/models/scimitar/service_provider_configuration.rb

#initialize(attributes = {}) ⇒ ServiceProviderConfiguration

Returns a new instance of ServiceProviderConfiguration.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'app/models/scimitar/service_provider_configuration.rb', line 25

def initialize(attributes = {})
  @uses_defaults = attributes.empty?

  defaults = {
    bulk:           Supportable.unsupported,
    changePassword: Supportable.unsupported,
    sort:           Supportable.unsupported,
    etag:           Supportable.unsupported,

    patch: Supportable.supported,

    filter: Scimitar::Filter.new(
      supported:  true,
      maxResults: Scimitar::Filter::MAX_RESULTS_DEFAULT
    ),

    schemas: ["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"],

    meta: Meta.new(
      resourceType: 'ServiceProviderConfig',
      created:      Time.now,
      lastModified: Time.now,
      version:      '1'
    ),

    authenticationSchemes: [
      AuthenticationScheme.basic,
      AuthenticationScheme.bearer
    ]
  }

  super(defaults.merge(attributes))
end