View Source SmeeView.Aspects.DiscoHints (SmeeView v0.2.1)

This aspect contains a bundle of related Discovery ("Disco") aspects from entity metadata.

Since scopes, networks, gelocations, domains, keywords, etc are often used together this Aspect exists to make gathering them all a little simpler.

You can extract and process each of the different types of aspects using their own View modules:

Summary

Functions

Return list of domain asspects (from <mdui:DomainHints> elements)

Returns a list of geolocation aspects (from <mdui:GeolocationHint> elements)

Is this aspect relevant to the IdP role?

Returns list of keyword aspects (from <mdui:Keywords> elements)

Returns a list of network aspects (from <mdui:IPHint> elements)

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

Returns a list of scope aspects used by the entity

Is this aspect relevant to the SP role?

Types

@type t() :: %SmeeView.Aspects.DiscoHints{
  domains: list(),
  geolocations: list(),
  keywords: list(),
  networks: list(),
  scopes: list()
}

Functions

@spec domains(aspect :: t()) :: list()

Return list of domain asspects (from <mdui:DomainHints> elements)

DiscoHints.domains(aspect)
# => [%Domain{}, %Domain{}]
@spec geolocations(aspect :: t()) :: list()

Returns a list of geolocation aspects (from <mdui:GeolocationHint> elements)

DiscoHints.geolocations(aspect)
# => [%Network{}. %Network{}]
@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.

DiscoHints.idp?(aspect)
# => true
@spec keywords(aspect :: t()) :: list()

Returns list of keyword aspects (from <mdui:Keywords> elements)

DiscoHints.keywords(aspect)
# => [%Keywords{}]
@spec networks(aspect :: t()) :: list()

Returns a list of network aspects (from <mdui:IPHint> elements)

DiscoHints.networks(aspect)
# => [%Network{}. %Network{}]
@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.

DiscoHints.role(aspect)
# => :idp
@spec scopes(aspect :: t()) :: list()

Returns a list of scope aspects used by the entity

DiscoHints.scopes(aspect)
# => [%Scope{regex: false, domain: "unseen.edu"}]
@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.

DiscoHints.sp?(aspect)
# => false