Table of Contents

Class AuthSchemas

Namespace
Ecng.Net
Assembly
Ecng.Net.dll

Provides authentication schemas and extension methods for formatting authentication tokens.

public static class AuthSchemas
Inheritance
AuthSchemas
Inherited Members

Fields

Basic

Represents the basic authentication scheme.

public const string Basic = "Basic"

Field Value

string

Bearer

Represents the bearer authentication scheme.

public const string Bearer = "Bearer"

Field Value

string

Methods

FormatAuth(string, SecureString)

Formats the authentication header using a secure string token. The token is converted to its unsecured string representation before formatting.

public static string FormatAuth(this string schema, SecureString token)

Parameters

schema string

The authentication scheme.

token SecureString

The secure string token.

Returns

string

A formatted authentication header.

FormatAuth(string, string)

Formats the authentication header using a regular string token.

public static string FormatAuth(this string schema, string token)

Parameters

schema string

The authentication scheme.

token string

The token as a string.

Returns

string

A formatted authentication header.