A class that represents a pair of user ID and password and provides Formatted
property which returns a string suitable as a value of Authorization
header for Basic Authentication.
More...
|
static BasicCredentials | Parse (AuthenticationHeaderValue value) |
| Create a BasicCredentials instance from the given AuthenticationHeaderValue instance. If null is given or if the scheme of the AuthenticationHeaderValue instance is not "Basic" , a BasicCredentials instance whose UserId and Password are both null is returned. More...
|
|
static BasicCredentials | Parse (string value) |
| Create a BasicCredentials instance from the given string whose format is expected to be "Basic {base64-encoded-string}" . If the given string is null or it does not match the pattern, a BasicCredentials instance whose UserId and Password are both null is returned. More...
|
|
|
string | UserId [get] |
| The user ID. More...
|
|
string | Password [get] |
| The password. More...
|
|
string | Formatted [get] |
| A string in "Basic {base64-encoded-string}" format which is suitable as a value of Authorization header for Basic Authentication. More...
|
|
string | FormattedParameter [get] |
| A string in "{base64-encoded-string}" format which is suitable as a value of the parameter part of Authorization header for Basic Authentication. More...
|
|
A class that represents a pair of user ID and password and provides Formatted
property which returns a string suitable as a value of Authorization
header for Basic Authentication.
◆ BasicCredentials()
Constructor with a pair of user ID and password.
◆ Parse() [1/2]
Create a BasicCredentials
instance from the given AuthenticationHeaderValue
instance. If null
is given or if the scheme of the AuthenticationHeaderValue
instance is not "Basic"
, a BasicCredentials
instance whose UserId
and Password
are both null
is returned.
- Returns
- A
BasicCredentials
instance generated based on the information of the given AuthenticationHeaderValue
instance.
- Parameters
-
value | A value of Authorization header whose scheme is "Basic" . |
◆ Parse() [2/2]
Create a BasicCredentials
instance from the given string whose format is expected to be "Basic {base64-encoded-string}"
. If the given string is null
or it does not match the pattern, a BasicCredentials
instance whose UserId
and Password
are both null
is returned.
- Returns
- A
BasicCredentials
instance generated based on the information of the given string.
- Parameters
-
value | A value of Authorization header whose scheme is "Basic" . |
◆ Formatted
A string in "Basic {base64-encoded-string}"
format which is suitable as a value of Authorization
header for Basic Authentication.
◆ FormattedParameter
string FormattedParameter |
|
get |
A string in "{base64-encoded-string}"
format which is suitable as a value of the parameter part of Authorization
header for Basic Authentication.
Since version 1.0.1
◆ Password
◆ UserId
The documentation for this class was generated from the following file:
- Authlete/Web/BasicCredentials.cs