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

Represents and processes <AttributeConsumingService> 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. Other modules may be needed for aspects of a different type contained inside this one.

Summary

Functions

Is this aspect relevant to the IdP role?

Returns the index integer for this endpoint/service

Returns a list of requested attributes, if any are present.

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

Returns a list of service descriptions (one per language)

Returns a list of service names (one per language)

Is this aspect relevant to the SP role?

Types

@type t() :: %SmeeView.Aspects.AttributeConsumingService{
  default: boolean(),
  index: integer(),
  requested_attributes: list(),
  service_descriptions: list(),
  service_names: list()
}

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.

AttributeConsumingService.idp?(aspect)
# => true
@spec index(aspect :: t()) :: integer()

Returns the index integer for this endpoint/service

AttributeConsumingService.index(service)
# => 1
Link to this function

requested_attributes(aspect)

View Source
@spec requested_attributes(aspect :: t()) :: list()

Returns a list of requested attributes, if any are present.

AttributeConsumingService.requested_attributes(service)
# => [%RequestedAttribute{...}, %RequestedAttribute{...}]
@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.

AttributeConsumingService.role(aspect)
# => :idp
Link to this function

service_descriptions(aspect)

View Source
@spec service_descriptions(aspect :: t()) :: list()

Returns a list of service descriptions (one per language)

AttributeConsumingService.service_descriptions(service)
# => [%ServiceDescription{lang: "en", ...}, %ServiceDescription{lang: "cn", ...}]
@spec service_names(aspect :: t()) :: list()

Returns a list of service names (one per language)

AttributeConsumingService.service_names(aspect)
# => [%ServiceName{lang: "en", ...}, %ServiceName{lang: "cn", ...}]
@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.

AttributeConsumingService.sp?(aspect)
# => false