# ConfluenceBearerCredentialSource

Applies a caller-supplied OAuth bearer token.

Class 

`OfficeIMO.Confluence`

**Namespace**

`OfficeIMO.Confluence`

**Assembly**

`OfficeIMO.Confluence`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[ConfluenceCredentials.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceCredentials.cs#L37)

**Implements**

`IConfluenceCredentialSource`

**Modifiers**

sealed

Applies a caller-supplied OAuth bearer token.

## Inheritance

- object
- ConfluenceBearerCredentialSource

Filter members 

Show inherited

## Constructors

`public ConfluenceBearerCredentialSource(string accessToken)` [#](#constructor-ctor-string)

[ConfluenceCredentials.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceCredentials.cs#L37)

Creates a Bearer authentication source from the supplied access token.

Parameters

**accessToken string required**

## Methods

`public Task ApplyAsync(HttpRequestMessage request, CancellationToken cancellationToken = default)` [#](#method-applyasync-net-http-httprequestmessage-threading-cancellationtoken)

[ConfluenceCredentials.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Confluence/ConfluenceCredentials.cs#L44)

Sets the request's Bearer Authorization header.

Parameters

**request System.Net.Http.HttpRequestMessage required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

## 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?`

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