Sha256: e2371b0b9887fb21400570cb9c0a975e9ad1e24aede132153435ceb94f73dc89
Contents?: true
Size: 1.51 KB
Versions: 23
Compression:
Stored size: 1.51 KB
Contents
module OneLogin module RubySaml # SAML2 AttributeService. Auxiliary class to build the AttributeService of the SP Metadata # class AttributeService attr_reader :attributes attr_reader :name attr_reader :index # Initializes the AttributeService, set the index value as 1 and an empty array as attributes # def initialize @index = "1" @attributes = [] end def configure(&block) instance_eval &block end # @return [Boolean] True if the AttributeService object has been initialized and set with the required values # (has attributes and a name) def configured? @attributes.length > 0 && !@name.nil? end # Set a name to the service # @param name [String] The service name # def service_name(name) @name = name end # Set an index to the service # @param index [Integer] An index # def service_index(index) @index = index end # Add an AttributeService # @param options [Hash] AttributeService option values # add_attribute( # :name => "Name", # :name_format => "Name Format", # :index => 1, # :friendly_name => "Friendly Name", # :attribute_value => "Attribute Value" # ) # def add_attribute(options={}) attributes << options end end end end
Version data entries
23 entries across 23 versions & 3 rubygems