AuthSchemas

Ecng.Net

Provides authentication schemas and extension methods for formatting authentication tokens.

方法

FormatAuth
public static string FormatAuth(string schema, SecureString token)
result = AuthSchemas.FormatAuth(schema, token)

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

schema
The authentication scheme.
token
The secure string token.

返回值: A formatted authentication header.

FormatAuth
public static string FormatAuth(string schema, string token)
result = AuthSchemas.FormatAuth(schema, token)

Formats the authentication header using a regular string token.

schema
The authentication scheme.
token
The token as a string.

返回值: A formatted authentication header.

字段

Basic
public const string Basic
value = AuthSchemas.Basic

Represents the basic authentication scheme.

Bearer
public const string Bearer
value = AuthSchemas.Bearer

Represents the bearer authentication scheme.