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

Represents and processes <mdrpi:RegistrationInfo> 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.

Link to this section Summary

Functions

Returns the ID URI of the registrar/registration authority

Is this aspect relevant to the IdP role?

Returns a list of any registration policies

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

Is this aspect relevant to the SP role?

Link to this section Types

Specs

t() :: %SmeeView.Aspects.Registration{
  authority: binary(),
  instant: binary(),
  policies: list()
}

Link to this section Functions

Specs

authority(aspect :: t()) :: binary()

Returns the ID URI of the registrar/registration authority

Registration.authority(aspect)
# => "http://ukfederation.org.uk"

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.

Registration.idp?(aspect)
# => true

Specs

instant(aspect :: t()) :: binary()

xx

Registration.instant(aspect)
# => "2014-11-07T16:35:40Z"

Specs

policies(aspect :: t()) :: list()

Returns a list of any registration policies

Registration.policies(aspect)
# => [%RegistrationPolicy{lang="en"}, %RegistrationPolicy{lang="sco"}]

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.

Registration.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.

Registration.sp?(aspect)
# => false