Show / Hide Table of Contents

Class StringTokenProvider

A simple token provider that always provides a static access token.

Inheritance
object
StringTokenProvider
Implements
ITokenProvider
Inherited Members
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: k8s.Authentication
Assembly: KubernetesClient.dll
Syntax
public sealed class StringTokenProvider : ITokenProvider

Constructors

View Source

StringTokenProvider(string, string)

Initializes a new instance of the StringTokenProvider class. Create a token provider for the given token type that returns the given access token.

Declaration
public StringTokenProvider(string accessToken, string tokenType)
Parameters
Type Name Description
string accessToken

The access token to return.

string tokenType

The token type of the given access token.

Properties

View Source

TokenType

Gets the token type of this access token.

Declaration
public string TokenType { get; }
Property Value
Type Description
string

Methods

View Source

GetAuthenticationHeaderAsync(CancellationToken)

Returns the static access token.

Declaration
public Task<AuthenticationHeaderValue> GetAuthenticationHeaderAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token for this action. This will not be used since the returned token is static.

Returns
Type Description
Task<AuthenticationHeaderValue>

The access token.

Implements

ITokenProvider
  • View Source
In this article
Back to top Generated by DocFX