Class: Scimitar::ServiceProviderConfiguration

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/scimitar/service_provider_configuration.rb

Overview

Represents the service provider info. Used by the /ServiceProviderConfig endpoint to provide specification compliance, authentication schemes and data models. Renders to JSON as a SCIM ServiceProviderConfig type.

See config/initializers/scimitar.rb for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#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

Instance Attribute Details

#authenticationSchemesObject

Returns the value of attribute authenticationSchemes.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def authenticationSchemes
  @authenticationSchemes
end

#bulkObject

Returns the value of attribute bulk.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def bulk
  @bulk
end

#changePasswordObject

Returns the value of attribute changePassword.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def changePassword
  @changePassword
end

#etagObject

Returns the value of attribute etag.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def etag
  @etag
end

#filterObject

Returns the value of attribute filter.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def filter
  @filter
end

#patchObject

Returns the value of attribute patch.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def patch
  @patch
end

#schemasObject

Returns the value of attribute schemas.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def schemas
  @schemas
end

#sortObject

Returns the value of attribute sort.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def sort
  @sort
end

#uses_defaultsObject

Returns the value of attribute uses_defaults.



12
13
14
# File 'app/models/scimitar/service_provider_configuration.rb', line 12

def uses_defaults
  @uses_defaults
end