View Source SmeeView.Aspects.DigestMethod (SmeeView v0.2.0)
Represents and processes <alg:DigestMethod> elements in entity metadata as Aspect structs.
The functions in this module are intended to be applied to individual Aspect structs - for extracting and processing collections of these records please use the matching View module.
Summary
Functions
Returns the name/text for this algorithm.
Is this aspect relevant to the IdP role?
Returns the associated role for this aspect: :sp, :idp or :all
Is this aspect relevant to the SP role?
Removes the namespace for the algorithm, leaving a smaller, friendlier, potentially colliding name
Types
@type t() :: %SmeeView.Aspects.DigestMethod{algorithm: binary()}
Functions
Returns the name/text for this algorithm.
Aspects containing text are printable and can be converted to strings using Kernel.to_string/1
or
interpolated into another string.
DigestMethod.algorithm(aspect)
# => "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
Is this aspect relevant to the IdP role?
Will return true
if the aspect has been derived from an IdP role, or is applicable to all roles.
DigestMethod.idp?(aspect)
# => true
Returns the associated role for this aspect: :sp, :idp or :all
The role type is useful when handling a mixed list of aspects that may be specific to certain roles of an entity.
DigestMethod.role(aspect)
# => :idp
Is this aspect relevant to the SP role?
Will return true
if the aspect has been derived from an SP role, or is applicable to all roles.
DigestMethod.sp?(aspect)
# => false
Removes the namespace for the algorithm, leaving a smaller, friendlier, potentially colliding name
DigestMethod.truncate(aspect)
# => "ecdsa-sha1"