---
title: "Class OAuthPasswordGrant"
slug: "web-sdk--stylelabs.m.sdk.webclient.authentication.oauthpasswordgrant"
abstract: ""
---
# Class OAuthPasswordGrant

This grant is a great user experience for trusted first party clients both on the web and in native device applications. Also known as "Resource owner credentials grant".

## Inheritance

object

OAuthPasswordGrant

## Implements

[IOAuthGrant](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.authentication.ioauthgrant.html)

## Namespace: StylelabsStylelabs.MSdkWebClientAuthentication

## Assembly: Stylelabs.M.Sdk.WebClient.dll

## Syntax

```csharp
public class OAuthPasswordGrant : IOAuthGrant
```

## Remarks

For more information see: [https://alexbilbie.com/guide-to-oauth-2-grants/](https://alexbilbie.com/guide-to-oauth-2-grants/).

## Properties

### ClientId

Gets or sets the client id.

#### Declaration

```csharp
public string ClientId { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### ClientSecret

Gets or sets the client secret.

#### Declaration

```csharp
public string ClientSecret { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Password

Gets or sets the Sitecore Content Hub user's password.

#### Declaration

```csharp
public string Password { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### UserName

Gets or sets the Sitecore Content Hub user's username.

#### Declaration

```csharp
public string UserName { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Implements

[IOAuthGrant](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.authentication.ioauthgrant.html)
