# KsefCredentials

Access and refresh tokens without publicly readable secret properties. Credentials are bound to one client and context.

Class 

`OfficeIMO.Invoicing.KSeF`

**Namespace**

`OfficeIMO.Invoicing.KSeF`

**Assembly**

`OfficeIMO.Invoicing.KSeF`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[KsefCredentials.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefCredentials.cs#L47)

**Implements**

`IDisposable`

**Modifiers**

sealed

Access and refresh tokens without publicly readable secret properties. Credentials are bound to one client and context.

## Inheritance

- object
- KsefCredentials

## Usage

Explore 10 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [KsefClient.RedeemAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-redeemasync-officeimo-invoicing-ksef-ksefauthentication-threading-cancellationtoken)

### Accepted by parameters 9

- Method [KsefClient.CloseOnlineSessionAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-closeonlinesessionasync-officeimo-invoicing-ksef-ksefcredentials-officeimo-invoicing-ksef-ksefonlinesession-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.GetInvoiceReceiptAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-getinvoicereceiptasync-officeimo-invoicing-ksef-ksefcredentials-officeimo-invoicing-ksef-ksefsubmission-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.GetInvoiceStatusAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-getinvoicestatusasync-officeimo-invoicing-ksef-ksefcredentials-officeimo-invoicing-ksef-ksefsubmission-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.GetSessionInvoicesAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-getsessioninvoicesasync-officeimo-invoicing-ksef-ksefcredentials-string-int32-string-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.GetSessionStatusAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-getsessionstatusasync-officeimo-invoicing-ksef-ksefcredentials-string-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.OpenOnlineSessionAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-openonlinesessionasync-officeimo-invoicing-ksef-ksefcredentials-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.RefreshAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-refreshasync-officeimo-invoicing-ksef-ksefcredentials-threading-cancellationtoken) parameter `credentials`
- Method [KsefClient.ResumeSubmission](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-resumesubmission-officeimo-invoicing-ksef-ksefcredentials-string-string-string) parameter `credentials`
- Method [KsefClient.SubmitAsync](/api/invoicing-ksef/officeimo-invoicing-ksef-ksefclient/#method-submitasync-officeimo-invoicing-ksef-ksefcredentials-officeimo-invoicing-ksef-ksefonlinesession-byte-officeimo-invoicing-validation-fa3schemavalidator-threading-cancellationtoken) parameter `credentials`

Filter members 

Show inherited

## Methods

`public void Dispose()` [#](#method-dispose)

[KsefCredentials.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefCredentials.cs#L47)

Clears both owned token buffers.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public KsefContext Context { get; }` [#](#property-context)

[KsefCredentials.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefCredentials.cs#L29)

Authenticated context; its value is an identifier, not a token.

`public DateTimeOffset AccessValidUntil { get; private set; }` [#](#property-accessvaliduntil)

[KsefCredentials.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefCredentials.cs#L31)

Expiration of the current access token.

`public DateTimeOffset RefreshValidUntil { get; }` [#](#property-refreshvaliduntil)

[KsefCredentials.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Invoicing.KSeF/KsefCredentials.cs#L33)

Expiration of the refresh token.

<!-- PowerForge markdown artifact sha256:D1D19B88558EE0322D96F268DAF609599317FCAB681FB0A0A8884A3BE8628DE2 -->
