-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: TokenEndpoint | ||
--- | ||
|
||
The `TokenEndpoint` class provides support for the API operations of the tokens endpoint. | ||
|
||
## Methods | ||
|
||
### `GetTokenPair` | ||
|
||
Obtain a new JWT token pair from the Nordigen API. | ||
|
||
```csharp | ||
public async Task<NordigenApiResponse<JsonWebTokenPair, BasicResponse>> | ||
GetTokenPair(CancellationToken cancellationToken = default) | ||
``` | ||
|
||
#### Parameters | ||
|
||
##### `cancellationToken` - [CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-8.0) | ||
|
||
Optional token to signal cancellation of the operation. | ||
|
||
#### Returns | ||
|
||
`Task<NordigenApiResponse<JsonWebTokenPair, BasicResponse>>` | ||
|
||
A `NordigenApiResponse` containing the obtained `JsonWebTokenPair` if the request was successful. | ||
|
||
### `RefreshAccessToken` | ||
|
||
Refresh the given JWT access token using a valid refresh token. | ||
|
||
```csharp | ||
public async Task<NordigenApiResponse<JsonWebAccessToken, BasicResponse>> | ||
RefreshAccessToken(JsonWebToken refreshToken, CancellationToken cancellationToken = default) | ||
``` | ||
|
||
#### Parameters | ||
|
||
##### `refreshToken` - [JsonWebToken](https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.jsonwebtokens.jsonwebtoken?view=msal-web-dotnet-latest) | ||
|
||
A valid refresh token that was previously obtained. | ||
|
||
##### `cancellationToken` - [CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-8.0) | ||
|
||
Optional token to signal cancellation of the operation. | ||
|
||
#### Returns | ||
|
||
`Task<NordigenApiResponse<JsonWebAccessToken, BasicResponse>>` | ||
|
||
A `NordigenApiResponse` containing the refreshed `JsonWebAccessToken` if the request was successful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Testing | ||
--- | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters