Class: Saml::Kit::Builders::IdentityProviderMetadata
- Inherits:
-
Object
- Object
- Saml::Kit::Builders::IdentityProviderMetadata
- Extended by:
- Forwardable
- Includes:
- Templatable
- Defined in:
- lib/saml/kit/builders/identity_provider_metadata.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#logout_urls ⇒ Object
readonly
Returns the value of attribute logout_urls.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name_id_formats ⇒ Object
Returns the value of attribute name_id_formats.
-
#single_sign_on_urls ⇒ Object
readonly
Returns the value of attribute single_sign_on_urls.
-
#want_authn_requests_signed ⇒ Object
Returns the value of attribute want_authn_requests_signed.
Attributes included from Templatable
Instance Method Summary collapse
- #add_single_logout_service(url, binding: :http_post) ⇒ Object
- #add_single_sign_on_service(url, binding: :http_post) ⇒ Object
- #build ⇒ Object
-
#initialize(configuration: Saml::Kit.configuration) ⇒ IdentityProviderMetadata
constructor
A new instance of IdentityProviderMetadata.
Methods included from Templatable
#encrypt?, #encryption_for, #render, #sign=, #sign?, #signature_for, #signatures, #to_xml
Constructor Details
#initialize(configuration: Saml::Kit.configuration) ⇒ IdentityProviderMetadata
Returns a new instance of IdentityProviderMetadata.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 14 def initialize(configuration: Saml::Kit.configuration) @attributes = [] @configuration = configuration @entity_id = configuration.issuer @id = Id.generate @logout_urls = [] @name_id_formats = [Namespaces::PERSISTENT] @single_sign_on_urls = [] @want_authn_requests_signed = true @metadata = Saml::Kit::Builders::Metadata.new(configuration: configuration) @metadata.identity_provider = self end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 7 def attributes @attributes end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
10 11 12 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 10 def configuration @configuration end |
#logout_urls ⇒ Object (readonly)
Returns the value of attribute logout_urls.
9 10 11 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 9 def logout_urls @logout_urls end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
11 12 13 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 11 def @metadata end |
#name_id_formats ⇒ Object
Returns the value of attribute name_id_formats.
7 8 9 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 7 def name_id_formats @name_id_formats end |
#single_sign_on_urls ⇒ Object (readonly)
Returns the value of attribute single_sign_on_urls.
9 10 11 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 9 def single_sign_on_urls @single_sign_on_urls end |
#want_authn_requests_signed ⇒ Object
Returns the value of attribute want_authn_requests_signed.
8 9 10 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 8 def want_authn_requests_signed @want_authn_requests_signed end |
Instance Method Details
#add_single_logout_service(url, binding: :http_post) ⇒ Object
31 32 33 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 31 def add_single_logout_service(url, binding: :http_post) @logout_urls.push(location: url, binding: Bindings.binding_for(binding)) end |
#add_single_sign_on_service(url, binding: :http_post) ⇒ Object
27 28 29 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 27 def add_single_sign_on_service(url, binding: :http_post) @single_sign_on_urls.push(location: url, binding: Bindings.binding_for(binding)) end |
#build ⇒ Object
35 36 37 |
# File 'lib/saml/kit/builders/identity_provider_metadata.rb', line 35 def build Saml::Kit::IdentityProviderMetadata.new(to_xml) end |