ASPSecurityKit

Assembly: ASPSecurityKit
Summary: Provides types common to all supported web frameworks.

Classes

ArgumentValidator

Internally used to validate function arguments.

AuthError

Represents an individual data point for an auth failure.

AuthFailedException

Represents an exception that can be thrown from any part of the authentication/authorization flow to indicate failure and thus terminate the request with appropriate reason and details.

AuthSessionProvider

Provides an implementation for IAuthSessionProvider to manage authenticated sessions and obtaining/validating auth identity tokens.

AuthToken

Defines the representation names of different auth token methods which you can override with custom name if so required.

Browser

Provides an implementation for IBrowser to determine browser information from user agent strings using the UAParser library.

CacheOptimizedPermitManager<TId>

Implements IPermitManager optimized for external cached storage like Redis.

CookieOptions

Represents various options (attributes) available for HTTP cookie.

DefaultErrorMessageResourceProvider

Implements IErrorMessageResourceProvider with default content in English language.

DigitalSignatureProvider

Provides methods to sign and verify public key cryptography based digital signatures using any of the hashing algorithms as defined by HashAlgorithmName.

HeaderKeys

Defines the representation names of custom headers which you can override with your own preferred name if so required.

IdentityTokenType

Defines the representation names of different identity token types which you can override with custom name if so required. Also provides methods to generate identity token urns (authUrns).

ImpersonateAllowOperation

Represents a model to define rules to white-list operations for impersonation.

InMemoryCacheClient

Provides an in-memory implementation of ICacheClient.

InMemoryPermitManager<TId>

Implements a memory-based IPermitManager without any optimization for external caching.

InMemorySessionService

Implements Dictionary<Tkey, TValue> based ISessionService to store and retrieve identity data for an authenticated session.

KeyPair

Represents a simple public/private key pair.

License

Provides methods to register and validate a license. To learn more visit https://ASPSecurityKit.net/docs/article/license/

LocaleService

Implements ILocaleService to provide user specific locale for both formatting and converting time in user time zone.

LoginResult

Represents the result of a login operation.

MiscExtensions

Static miscellaneous extension methods for general, reusable utility operations.

NoActionSecurityEvents

Provides an implementation of ISecurityEvents that does nothing. You can inherit from this implementation and override the event(s) you want to do custom processing upon.

OpException

Represents an exception that can be thrown to indicate operation failure along with its cause. You can use this exception type as a custom application or domain validation exception to pass on useful information to the client securely. See the guidance given in the remarks for this purpose.

PBKDF2HashService

Implements IHashService using Salted password hashing with PBKDF2-SHA1 algorithm.

SecurityContext

Implements the ISecurityContext to hold security related data for the lifetime of the request.

SecurityPipeline

Implements the ISecurityPipeline to protect your application with authentication, multi-factor, activity-based and data-aware authorization, IP firewall, verification and suspension checks. To learn more visit https://ASPSecurityKit.net/docs/article/the-security-pipeline/

SecuritySettings

Implements the ISecuritySettings to enable configuration of various security settings used by the security pipeline.

SecurityUtility

Implements utility methods required by security operations as defined by the ISecurityUtility.

StringExtensions

Static string extension methods for general, reusable utility operations.

TryOperationResult<TValue>

Represents a result of calling a safe try method.

TypeExtensions

Static Type extension methods for general, reusable utility operations.

UserDataItem

Represents a model maintained by userService for storing custom information related to the authenticated identity.

UserService<TId,TEntityId,TUser>

Implements IUserService<TId,TEntityId,TUser> and provides logic for authenticating, authorizing and managing user identities to consuming application.

UserServiceSessionDetails<TId,TUser>

Represents a session details model maintained by userService internally.

Enums

InstanceScope

Lifetime scope for initialized dependency.

LicenseFeature

Represents various ASPSecurityKit features that can be enabled by a license key.

RequestFeature

Enumerates various security features that can be enabled on requests.

SameSiteOption

Enumerates possible values for SameSite attribute of HTTP cookie.

Interfaces

IAuthDetails

Provides an interface to represent details related to identity tokens.

IAuthDetails<TId>

Extends IAuthDetails and provides a generic interface to represent details related to identity tokens.

IAuthSessionProvider

Provides an interface to manage authenticated sessions.

IBrowser

Defines operations to determine browser information from user agent strings.

ICacheClient

Provides an interface to perform simple caching operations.

IConfig

Provides an interface to access application configuration.

IContainer

Provides an interface to represent a simple dependency injection resolver required by ASK components. You provide the implementation based on DI framework of your choice. Check out https://ASPSecurityKit.net/docs/article/source-packages/ – every source package comes with a default implementation.

IContainerBuilder

Provides an interface to represent a simple dependency injection builder required by ASK components. You provide the implementation based on DI framework of your choice. Check out https://ASPSecurityKit.net/docs/article/source-packages/ – every source package comes with a default implementation.

IErrorMessageResourceProvider

Defines messages for security violations content of which can be customized for locale and other needs.

IFirewallIpRange

Provides an interface to represent IP ranges white listed for tokens

IHashService

Provides an interface to implement password hashing operations using algorithm of choice.

IIdentityRepository

Provides an abstraction to implement a repository for identity tokens in the database/ORM technology of your choice.

ILocaleService

Provides an interface to implement user specific locale for both formatting and converting time in user time zone.

ILogger

Provides a simple interface for writing application logs.

IPermit

Base interface to represent the user permit model for the application. Note: use IPermit (which derives from this interface) to implement the user permit model instead.

IPermit<TId>

Extends IPermit and provides a strongly typed interface to represent the user permit model for the application.

IPermitManager<TId>

Defines operations to manage permits for an authenticated session.

IPermitRepository<TId,TEntityId>

Provides an abstraction to implement a repository for IPermit in the database/ORM technology of your choice.

IRequestService

Provides an abstraction to interact with platform specific request/response objects.

ISecurityContext

Provides an interface to represent the security context for a request.

ISecurityEvents

Provides implementers a way to listen to security pipeline related events and do custom pre/post processing.

ISecurityFailureResponseHandler

Provides an interface to implement a response handler if requested operation fails any security check.

ISecurityPipeline

Represents ASPSecurityKit security pipeline to protect your application with authentication, multi-factor, activity-based and data-aware authorization, IP firewall, verification and suspension checks. To learn more visit https://ASPSecurityKit.net/docs/article/the-security-pipeline/

ISecuritySettings

Defines configuration settings for security pipeline.

ISecurityUtility

Defines utility methods required by security operations.

ISessionService

Defines operations to store and retrieve identity data for an authenticated session.

ISuspendedId

Interface to represent a suspended entityId model.

ISuspensionService

Provides an abstraction to implement a service for entity suspension.

IUser

Base interface to represent the user model for the application. Note: use IUser (which derives from this interface) to implement the user model instead.

IUser<TId>

Extends IUser and provides a strongly typed interface to represent the user model for the application.

IUserMultiFactor

Represents a user’s multi-factor model for the application.

IUserRepository<TId>

Provides an abstraction to implement a repository for IUser in the database/ORM technology of your choice.

IUserService

Provides a base interface for authenticating, authorizing and managing user identities.

IUserService<TId,TEntityId,TUser>

Extends IUserService and provides a generic interface for authenticating, authorizing and managing user identities.

IWhitelistedDomain

Provides an interface to represent patterns to white list domains for public keys.

Structs

HashAlgorithmName

Represents the name of a cryptographic hash algorithm.

KeyWrapper<TKey>

Wrapper type to additionally represent null keys in generic dictionary which otherwise doesn’t support null keys.

OpResult

Enumerates various possible values to represent as a result of executing an operation.