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
clientIdstringClient identifier.
clientSecretstringClient secret.
accessTokenstringAccess token.
refreshTokenstringRefresh token.
expiresDateTime?Access token expiration date and time.
Properties
Expires
Access token expiration date and time.
public DateTime Expires { get; init; }
Property Value
Id
Current user identifier (AthleteId), or zero if not authenticated.
public long Id { get; set; }
Property Value
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
accessTokenstringThe new access token.
refreshTokenstringThe new refresh token.
expiresDateTimeThe new expiration date and time for the access token.
Returns
- StravaAuthorization
A new StravaAuthorization instance with updated token information.