BasicFields Class
Definition
- Namespace
- Cuemon.AspNetCore.Authentication.Basic
- Assemblies
- Cuemon.AspNetCore.Authentication.dll
A collection of constants for BasicAuthorizationHeaderBuilder.
public static class BasicFields
- Inheritance
-
BasicFields
Examples
The following example demonstrates how to use the field constants of BasicFields to construct a Basic authorization header.
// Program.cs
using System;
using Cuemon.AspNetCore.Authentication.Basic;
var builder = new BasicAuthorizationHeaderBuilder();
builder.AddUserName("alice");
builder.AddPassword("s3cret");
var header = builder.Build();
Console.WriteLine(BasicAuthorizationHeader.Scheme);
Console.WriteLine(BasicFields.Realm);
Console.WriteLine(BasicFields.Credentials);
Fields
| Name | Description |
|---|---|
| Credentials | The credentials of the HTTP Basic access authentication. |
| Password | The password of the Credentials. |
| Realm | The realm field of a HTTP Basic access authentication. |
| UserName | The username of the Credentials. |