View Source SmeeView.Aspects.NameIDFormat (SmeeView v0.2.0)

Represents and processes <NameIDFormat> 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

Is this aspect relevant to the IdP role?

Returns the value of the nameid as a string

Returns the associated role for this aspect: :sp, :idp or :all

Is this aspect relevant to the SP role?

Returns the value of the nameid as a string

Types

@type t() :: %SmeeView.Aspects.NameIDFormat{uri: binary()}

Functions

@spec idp?(aspect :: t()) :: boolean()

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.

NameIDFormat.idp?(aspect)
# => true
@spec nameid(aspect :: t()) :: binary()

Returns the value of the nameid as a string

NameIDFormat.nameid(aspect)
# => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
@spec role(aspect :: t()) :: atom()

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.

NameIDFormat.role(aspect)
# => :idp
@spec sp?(aspect :: t()) :: boolean()

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.

NameIDFormat.sp?(aspect)
# => false
@spec text(aspect :: t()) :: binary()

Returns the value of the nameid as a string

NameIDFormat.text(aspect)
# => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"