Class AuthSchemas
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
Bearer
Represents the bearer authentication scheme.
public const string Bearer = "Bearer"
Field Value
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
stringThe authentication scheme.
token
SecureStringThe 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
Returns
- string
A formatted authentication header.