Table of Contents

Namespace Arc4u.Security.Principal

Classes

AppAuthorization

The default IAuthorization implementation, built from an Authorization data object. Roles and operations are grouped by scope; the methods without a scope parameter use the empty scope (Empty).

AppPrincipal

AppPrincipal is the principal which knows all the information on a person (authorization, authentication and profile information). We use a principal because it is copied from thrad to thead (new in .Net 2.0).

AppPrincipalException

The AppPrincipalException is thrown when a problem occurs during the collection of information needed to have a valid principal.

ApplicationClaimsPrincipalSelectorContext

An IApplicationContext that stores the principal in CurrentPrincipal and reads it from Current.

ApplicationContextServiceCollectionExtension

Extension methods to register the IApplicationContext.

ApplicationInstanceContext

This class can be registered manually in your DI container.

  1. as Singleton when used: a) in UI. b) in one instance application context c) unit test.
  2. as Scoped in AspNetCore backend or backend unit test.. The Export must only be used in case 1.
Authorization

The Authorization class is the class designed to contains the authority information filled by a AuthorizationFiller and is serializable.

AuthorizationException

The exception warn a problem to retrieve the authorization data used to check the rights on a program.

ClaimsAuthorizationFiller

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

ClaimsProfileFiller

An IClaimProfileFiller that builds the UserProfile from the claims of a ClaimsIdentity (name, given name, surname, e-mail, user principal name, company, phones, culture and security identifier).

Operation

An operation is the atomic entity defining what a user can do.

ScopedOperations

The ScopedOperations are the operations defined for a specific scope.

ScopedRoles

The scopedRoles are the roles defined for a specific scope.

SecurityIdentifierExt

The class extend the security identifier to generate a custom sid based on a Guid. It is useful if you need to use Azman with a custom sid.

UserProfile

The class contains the main information on a User. The informations are retrieve from the AD but can be constructed from any other sources. The class is binay and xml serialisable.

Interfaces

IAppPrincipalFactory

Creates (and signs out) the AppPrincipal of the user, based on a token obtained with settings resolved from the dependency injection container.

IApplicationContext

Gives access to the context of the running application: the current principal. Depending on the implementation the context is a singleton (UI, single instance applications, unit tests) or scoped (ASP.NET Core back-ends).

IAuthorization

The interface defines the authorization pattern used to check if a user is able to do an operation or not. The methods are based on Azman and Role base model See msdn for azman documentation.

IAuthorizationFiller

Authorization filler is an interface used to custom the framework by a specific authorization authority returning an authorization data.

IClaimAuthorizationFiller

Authorization filler for the new Principal based on Claims. IAuthorizationFiller was used before.

IClaimProfileFiller

Profile filler for the new Principal based on Claims. IProfileFiller was used before.

IClaimsFiller

Provides additional claims for an identity, for example from a back-end service.

IProfileFiller

The inerface define the method use to fill a user profile based on the three parameters (WindowsIdentity, Sid and user name).