Table of Contents

Class ClaimsAuthorizationFiller

Namespace
Arc4u.Security.Principal
Assembly
Arc4u.dll

An IClaimAuthorizationFiller that reads the Authorization claim of a ClaimsIdentity and deserializes it into an Authorization.

[Export(typeof(IClaimAuthorizationFiller))]
[Shared]
public class ClaimsAuthorizationFiller : IClaimAuthorizationFiller, IAuthorizationFiller
Inheritance
ClaimsAuthorizationFiller
Implements
Inherited Members

Constructors

ClaimsAuthorizationFiller(ILogger<ClaimsAuthorizationFiller>)

An IClaimAuthorizationFiller that reads the Authorization claim of a ClaimsIdentity and deserializes it into an Authorization.

public ClaimsAuthorizationFiller(ILogger<ClaimsAuthorizationFiller> logger)

Parameters

logger ILogger<ClaimsAuthorizationFiller>

The logger used to trace a claim that cannot be deserialized.

Methods

GetAuthorization(IIdentity)

Gets the authorization data of the identity.

public Authorization GetAuthorization(IIdentity identity)

Parameters

identity IIdentity

The identity, which must be a ClaimsIdentity.

Returns

Authorization

The authorization contained in the authorization claim, or an empty Authorization when the claim is missing or cannot be deserialized.

Exceptions

ArgumentNullException

identity is null.

NotSupportedException

identity is not a ClaimsIdentity.