> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Authorization.AuthorizationUsernamePassword

# \<a id="SuperOffice\_WebApi\_Authorization\_AuthorizationUsernamePassword">\</a> Class AuthorizationUsernamePassword

Namespace: [SuperOffice.WebApi.Authorization](SuperOffice.WebApi.Authorization.md)\
Assembly: SuperOffice.WebApi.Authorization.dll

Username and password \<xref href="SuperOffice.WebApi.Authorization.IAuthorization" data-throw-if-not-resolved="false">\</xref> using Basic scheme.

```csharp theme={null}
public class AuthorizationUsernamePassword : IAuthorization
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AuthorizationUsernamePassword](SuperOffice.WebApi.Authorization.AuthorizationUsernamePassword.md)

#### Implements

[IAuthorization](SuperOffice.WebApi.Authorization.IAuthorization.md)

#### Inherited Members

[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### \<a id="SuperOffice\_WebApi\_Authorization\_AuthorizationUsernamePassword\_\_ctor\_System\_String\_System\_String\_">\</a> AuthorizationUsernamePassword(string, string)

UserNamePasswordAuthorization Constructor

```csharp theme={null}
public AuthorizationUsernamePassword(string userName, string password)
```

#### Parameters

`userName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Users name.

`password` [string](https://learn.microsoft.com/dotnet/api/system.string)

Users password.

## Properties

### \<a id="SuperOffice\_WebApi\_Authorization\_AuthorizationUsernamePassword\_RefreshAuthorizationAsync">\</a> RefreshAuthorizationAsync

Try to refresh this \<xref href="SuperOffice.WebApi.Authorization.IAuthorization" data-throw-if-not-resolved="false">\</xref> instance.

```csharp theme={null}
public Func<ReAuthorizationArgs, Task<IAuthorization>> RefreshAuthorizationAsync { get; set; }
```

#### Property Value

[Func](https://learn.microsoft.com/dotnet/api/system.func-2)\<[ReAuthorizationArgs](SuperOffice.WebApi.Authorization.ReAuthorizationArgs.md), [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[IAuthorization](SuperOffice.WebApi.Authorization.IAuthorization.md)\&gt;\&gt;

## Methods

### \<a id="SuperOffice\_WebApi\_Authorization\_AuthorizationUsernamePassword\_GetAuthorization">\</a> GetAuthorization()

Gets a tuple that represents authorization scheme and parameter for a base64 encoded username:password.

```csharp theme={null}
public AuthenticationHeaderValue GetAuthorization()
```

#### Returns

[AuthenticationHeaderValue](https://learn.microsoft.com/dotnet/api/system.net.http.headers.authenticationheadervalue)

Gets a \<xref href="System.Tuple%602" data-throw-if-not-resolved="false">\</xref> (string,string) where scheme is Basic and parameter is base64 encoded username:password.


## Related topics

- [SuperOffice.WebApi.Authorization](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.md)
- [SuperOffice.WebApi.Authorization.IAuthorization](/en/api/reference/webapi/SuperOffice.WebApi.Authorization.IAuthorization.md)
- [SuperOffice.WebApi.Agents.AIAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AIAgent.md)
- [SuperOffice.WebApi.Agents.BLOBAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.BLOBAgent.md)
- [SuperOffice.WebApi.Agents.MDOAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.MDOAgent.md)
- [SuperOffice.WebApi.Agents.WebhookAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.WebhookAgent.md)
