class
Saml::Attributes
- Saml::Attributes
- Reference
- Object
Overview
SAML2 Attributes. Parse the Attributes from the AttributeStatement of the SAML Response.
Included Modules
- Enumerable({String, Array(String?)})
Defined in:
saml/attributes.crConstructors
-
.new(attrs : Hash(String, Array(AttributeValue)) = {} of String => Array(AttributeValue))
@param attrs [Hash] attribute names to arrays of values
Instance Method Summary
- #==(other : Attributes)
-
#[](name) : Array(AttributeValue) | Nil
All values of the attribute, nil when it is missing.
- #[]=(name, values : Array(AttributeValue))
- #add(name, values : Array(AttributeValue) = [] of AttributeValue)
-
#all : Hash(String, Array(AttributeValue))
@return [Hash] Return all attributes as a hash
- #attributes : Hash(String, Array(AttributeValue))
-
#each(& : Tuple(String, Array(AttributeValue)) -> )
Must yield this collection's elements to the block.
-
#fetch(name : String | Symbol | Regex) : Array(AttributeValue) | Nil
Fetch attribute value using name or regex
-
#includes?(name) : Bool
Test attribute presence by name
-
#multi(name) : Array(AttributeValue) | Nil
Return all values for an attribute
- #set(name, values : Array(AttributeValue))
-
#single(name) : AttributeValue
Return first value for an attribute
-
#to_h : Hash(String, Array(String))
Name to non-nil values, as plain strings.
Constructor Detail
@param attrs [Hash] attribute names to arrays of values
Instance Method Detail
def each(& : Tuple(String, Array(AttributeValue)) -> )
#
Description copied from module Enumerable({String, Array(String?)})
Must yield this collection's elements to the block.
def fetch(name : String | Symbol | Regex) : Array(AttributeValue) | Nil
#
Fetch attribute value using name or regex