SmeeView.Aspects.Protocol (SmeeView v0.1.0) View Source

Represents and processes protocolSupportEnumeration XML attributes 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.

Link to this section Summary

Functions

Is this aspect relevant to the IdP role?

Returns the protocol URI as a string binary.

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

Is this aspect relevant to the SP role?

Returns the protocol URI as a string binary.

Link to this section Types

Specs

t() :: %SmeeView.Aspects.Protocol{role: atom(), uri: binary()}

Link to this section Functions

Specs

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.

Protocol.idp?(aspect)
# => true

Specs

protocol(aspect :: t()) :: binary()

Returns the protocol URI as a string binary.

Protocol.protocol(aspect)
# => ""urn:oasis:names:tc:SAML:2.0:protocol"

Specs

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.

Protocol.role(aspect)
# => :idp

Specs

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.

Protocol.sp?(aspect)
# => false

Specs

text(aspect :: t()) :: binary()

Returns the protocol URI as a string binary.

Protocol.text(aspect)
# => ""urn:oasis:names:tc:SAML:2.0:protocol"