#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Model](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model 'Abblix\.Oidc\.Server\.Model')

## TokenRequest Class

Represents a request to get various types of tokens \(e\.g\., access token, refresh token\) from
the authorization server\. This is part of the OAuth 2\.0 and OpenID Connect token exchange flow,
where clients can request tokens based on different grant types like 'authorization\_code', 'refresh\_token'
and others\.

```csharp
public record TokenRequest : System.IEquatable<Abblix.Oidc.Server.Model.TokenRequest>
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → TokenRequest

Implements [System\.IEquatable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')[TokenRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest 'Abblix\.Oidc\.Server\.Model\.TokenRequest')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')
### Properties

## TokenRequest\.ActorToken Property {#Abblix.Oidc.Server.Model.TokenRequest.ActorToken}

RFC 8693 §2\.1 `actor_token` \-\- security token representing the acting party in delegation
flows\. Optional\. When present, [ActorTokenType](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest#Abblix.Oidc.Server.Model.TokenRequest.ActorTokenType 'Abblix\.Oidc\.Server\.Model\.TokenRequest\.ActorTokenType') MUST also be present\.

```csharp
public string? ActorToken { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.ActorTokenType Property {#Abblix.Oidc.Server.Model.TokenRequest.ActorTokenType}

RFC 8693 §2\.1 `actor_token_type` \-\- identifier for the format of [ActorToken](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest#Abblix.Oidc.Server.Model.TokenRequest.ActorToken 'Abblix\.Oidc\.Server\.Model\.TokenRequest\.ActorToken'),
one of [TokenExchangeTokenTypes](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.TokenExchangeTokenTypes 'Abblix\.Oidc\.Server\.Common\.Constants\.TokenExchangeTokenTypes')\. Required when [ActorToken](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest#Abblix.Oidc.Server.Model.TokenRequest.ActorToken 'Abblix\.Oidc\.Server\.Model\.TokenRequest\.ActorToken') is present\.

```csharp
public string? ActorTokenType { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.Assertion Property {#Abblix.Oidc.Server.Model.TokenRequest.Assertion}

The JWT assertion used in the JWT Bearer grant type per RFC 7523\.
This contains a signed JWT with claims about the resource owner and is used to request an access token\.

```csharp
public string? Assertion { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.Audiences Property {#Abblix.Oidc.Server.Model.TokenRequest.Audiences}

RFC 8693 §2\.1 `audience` \-\- logical name\(s\) of the relying party for which the requested
token is intended\. Distinct from [Resources](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest#Abblix.Oidc.Server.Model.TokenRequest.Resources 'Abblix\.Oidc\.Server\.Model\.TokenRequest\.Resources') \(RFC 8707 absolute URIs\); audience is
a free\-form identifier\.

```csharp
public string[]? Audiences { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## TokenRequest\.AuthenticationRequestId Property {#Abblix.Oidc.Server.Model.TokenRequest.AuthenticationRequestId}

The authentication request ID, used in CIBA \(Client\-Initiated Backchannel Authentication\) flow\.
This identifier references a backchannel authentication request initiated by the client\.

```csharp
public string? AuthenticationRequestId { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.Code Property {#Abblix.Oidc.Server.Model.TokenRequest.Code}

The authorization code received from the authorization server\.
This is used in the authorization code grant type to exchange for an access token\.

```csharp
public string? Code { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.CodeVerifier Property {#Abblix.Oidc.Server.Model.TokenRequest.CodeVerifier}

The code verifier used in the PKCE \(Proof Key for Code Exchange\) process\.
Required for public clients using the authorization code grant type to enhance security\.

```csharp
public string? CodeVerifier { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.DeviceCode Property {#Abblix.Oidc.Server.Model.TokenRequest.DeviceCode}

The device code used in the Device Authorization Grant \(RFC 8628\) flow\.
This code is obtained from the device authorization endpoint and used to poll for tokens\.

```csharp
public string? DeviceCode { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.GrantType Property {#Abblix.Oidc.Server.Model.TokenRequest.GrantType}

The grant type of the token request, indicating the method being used to get the token\.
Common values include 'authorization\_code', 'refresh\_token', 'password', etc\.

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

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

### Remarks
Deliberately not constrained by a declarative value list: grant handlers are an extensible,
host\-configured set, and the composite grant handler rejects an unregistered grant with the
protocol\-level unsupported grant type error\.

## TokenRequest\.Password Property {#Abblix.Oidc.Server.Model.TokenRequest.Password}

The password of the resource owner, required when using the resource owner password credentials grant type\.

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

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.RedirectUri Property {#Abblix.Oidc.Server.Model.TokenRequest.RedirectUri}

The redirect URI where the response will be sent\.
This must match the redirect URI registered with the authorization server during the initial request\.

```csharp
public System.Uri? RedirectUri { get; set; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## TokenRequest\.RefreshToken Property {#Abblix.Oidc.Server.Model.TokenRequest.RefreshToken}

The refresh token used to get a new access token\. Required when using the refresh token grant type\.

```csharp
public string? RefreshToken { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.RequestedTokenType Property {#Abblix.Oidc.Server.Model.TokenRequest.RequestedTokenType}

RFC 8693 §2\.1 `requested_token_type` \-\- identifier of the token type the client would like
the AS to issue, one of [TokenExchangeTokenTypes](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.TokenExchangeTokenTypes 'Abblix\.Oidc\.Server\.Common\.Constants\.TokenExchangeTokenTypes')\. Optional; defaults to
[AccessToken](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.TokenExchangeTokenTypes#Abblix.Oidc.Server.Common.Constants.TokenExchangeTokenTypes.AccessToken 'Abblix\.Oidc\.Server\.Common\.Constants\.TokenExchangeTokenTypes\.AccessToken')\.

```csharp
public string? RequestedTokenType { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.Resources Property {#Abblix.Oidc.Server.Model.TokenRequest.Resources}

The resource URI\(s\) for which the access token is being requested\.
This parameter is optional and used in scenarios such as OAuth 2\.0 for APIs
to specify the resource\(s\) being accessed\.

```csharp
public System.Uri[]? Resources { get; set; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

### Remarks
Defined in RFC 8707 as a way to express the resource\(s\) the client is requesting access to\.

## TokenRequest\.Scope Property {#Abblix.Oidc.Server.Model.TokenRequest.Scope}

The scope of the access request, expressed as a space\-separated list of case\-sensitive strings\.
This defines the permissions or resources the client is requesting access to\.

```csharp
public string[] Scope { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## TokenRequest\.SubjectToken Property {#Abblix.Oidc.Server.Model.TokenRequest.SubjectToken}

RFC 8693 §2\.1 `subject_token` \-\- the security token being exchanged\. Required for
[TokenExchange](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.GrantTypes#Abblix.Oidc.Server.Common.Constants.GrantTypes.TokenExchange 'Abblix\.Oidc\.Server\.Common\.Constants\.GrantTypes\.TokenExchange')\.

```csharp
public string? SubjectToken { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.SubjectTokenType Property {#Abblix.Oidc.Server.Model.TokenRequest.SubjectTokenType}

RFC 8693 §2\.1 `subject_token_type` \-\- identifier for the format of [SubjectToken](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest#Abblix.Oidc.Server.Model.TokenRequest.SubjectToken 'Abblix\.Oidc\.Server\.Model\.TokenRequest\.SubjectToken'),
one of [TokenExchangeTokenTypes](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.TokenExchangeTokenTypes 'Abblix\.Oidc\.Server\.Common\.Constants\.TokenExchangeTokenTypes')\. Required for [TokenExchange](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.GrantTypes#Abblix.Oidc.Server.Common.Constants.GrantTypes.TokenExchange 'Abblix\.Oidc\.Server\.Common\.Constants\.GrantTypes\.TokenExchange')\.

```csharp
public string? SubjectTokenType { get; set; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## TokenRequest\.UserName Property {#Abblix.Oidc.Server.Model.TokenRequest.UserName}

The username of the resource owner, required when using the resource owner password credentials grant type\.

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

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')
