Table of Contents

Class StravaAuthorization

Namespace
Tudormobile.Strava
Assembly
Tudormobile.Strava.dll

Client Authorization Record.

public class StravaAuthorization : StravaAuthorizationOptions
Inheritance
StravaAuthorization
Inherited Members

Constructors

StravaAuthorization(string?, string?, string?, string?, DateTime?)

Create and initialize a new instance.

public StravaAuthorization(string? clientId = null, string? clientSecret = null, string? accessToken = null, string? refreshToken = null, DateTime? expires = null)

Parameters

clientId string

Client identifier.

clientSecret string

Client secret.

accessToken string

Access token.

refreshToken string

Refresh token.

expires DateTime?

Access token expiration date and time.

Properties

Expires

Access token expiration date and time.

public DateTime Expires { get; init; }

Property Value

DateTime

Id

Current user identifier (AthleteId), or zero if not authenticated.

public long Id { get; set; }

Property Value

long

Methods

WithTokens(string, string, DateTime)

Creates a new StravaAuthorization instance with updated access and refresh tokens and expiration.

public StravaAuthorization WithTokens(string accessToken, string refreshToken, DateTime expires)

Parameters

accessToken string

The new access token.

refreshToken string

The new refresh token.

expires DateTime

The new expiration date and time for the access token.

Returns

StravaAuthorization

A new StravaAuthorization instance with updated token information.