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

# Oauth2CodeAuthManifest

```csharp
public sealed record Oauth2CodeAuthManifest : RedirectAuthManifest, IEquatable<AuthManifest>, IEquatable<OAuthManifest>, IEquatable<RedirectAuthManifest>, IEquatable<Oauth2CodeAuthManifest>
```

**Extends:** `RedirectAuthManifest`

**Implements:** `IEquatable<AuthManifest>`, `IEquatable<OAuthManifest>`, `IEquatable<RedirectAuthManifest>`, `IEquatable<Oauth2CodeAuthManifest>`

## Constructors

```csharp
public Oauth2CodeAuthManifest()
```

## Properties

**EqualityContract** `Type` *required*

**Pkce** `bool` *required*

**RevokeUrl** `string`

Where a refresh token is revoked (RFC 7009), when a connection is deleted or its authorization refused.

**Sandbox** `CodeSandboxManifest`

The vendor's test environment, picked by a switch on the connection.

**Scopes** `IList\<string\>` *required*

**ScopeSeparator** `ScopeSeparator` *required*

What joins the scopes. A space, as RFC 6749 says, unless the vendor reads a comma.

## Methods

### AuthorizeRequestFor()

```csharp
public Uri AuthorizeRequestFor(string? clientId, string? redirectUri, string? state, OAuthPkce? pkce, IReadOnlyDictionary<string, string?>? settings)
```

The address that asks the vendor to approve `clientId`, kept on the authorize URL's own query.

#### Parameters

**clientId** `string` *required*

The OAuth client asking.

**redirectUri** `string` *required*

Where the vendor sends the code, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for the one the app registered.

**state** `string` *required*

What the vendor sends back with the code.

**pkce** `OAuthPkce` *required*

The approval's PKCE verifier, from [NewPkce()](https://klef.ai/docs/connector-sdk/reference/sdk/oauth2codeauthmanifest.md).

**settings** `IReadOnlyDictionary\<string, string\>` *required*

The connection's values, which pick a sandbox and fill the URL.

#### Returns

`Uri`

### AuthorizeUrlFor()

```csharp
public override string AuthorizeUrlFor(IReadOnlyDictionary<string, string?>? settings, IReadOnlyDictionary<string, string?>? installation)
```

#### Parameters

**settings** `IReadOnlyDictionary\<string, string\>` *required*

**installation** `IReadOnlyDictionary\<string, string\>` *required*

The installation's values, such as its app's URL name.

#### Returns

`string`

### ConnectionFields()

```csharp
public override IEnumerable<string> ConnectionFields()
```

#### Returns

`IEnumerable<string>`

### Equals()

```csharp
public bool Equals(Oauth2CodeAuthManifest? other)
```

#### Parameters

**other** `Oauth2CodeAuthManifest` *required*

#### Returns

`bool`

```csharp
public override sealed bool Equals(RedirectAuthManifest? other)
```

#### Parameters

**other** `RedirectAuthManifest` *required*

#### Returns

`bool`

```csharp
public override bool Equals(object? obj)
```

#### Parameters

**obj** `object` *required*

#### Returns

`bool`

### GetHashCode()

```csharp
public override int GetHashCode()
```

#### Returns

`int`

### NewPkce()

```csharp
public OAuthPkce? NewPkce()
```

Creates a PKCE verifier for a new approval, or returns [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the vendor takes none.

#### Returns

`OAuthPkce`

### operator !=()

```csharp
public static bool operator !=(Oauth2CodeAuthManifest? left, Oauth2CodeAuthManifest? right)
```

#### Parameters

**left** `Oauth2CodeAuthManifest` *required*

**right** `Oauth2CodeAuthManifest` *required*

#### Returns

`bool`

### operator ==()

```csharp
public static bool operator ==(Oauth2CodeAuthManifest? left, Oauth2CodeAuthManifest? right)
```

#### Parameters

**left** `Oauth2CodeAuthManifest` *required*

**right** `Oauth2CodeAuthManifest` *required*

#### Returns

`bool`

### PrintMembers()

```csharp
protected override bool PrintMembers(StringBuilder builder)
```

#### Parameters

**builder** `StringBuilder` *required*

#### Returns

`bool`

### RevokeUrlFor()

```csharp
public string? RevokeUrlFor(IReadOnlyDictionary<string, string?>? settings)
```

#### Parameters

**settings** `IReadOnlyDictionary\<string, string\>` *required*

#### Returns

`string`

### ScopeParameter()

```csharp
public string ScopeParameter()
```

#### Returns

`string`

### TokenUrlFor()

```csharp
public override string TokenUrlFor(IReadOnlyDictionary<string, string?>? settings)
```

#### Parameters

**settings** `IReadOnlyDictionary\<string, string\>` *required*

#### Returns

`string`

### ToString()

```csharp
public override string ToString()
```

#### Returns

`string`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.