Skip to content

Commit 115f11b

Browse files
committed
Match Documentation Index With README
1 parent 1df55b4 commit 115f11b

File tree

1 file changed

+53
-12
lines changed

1 file changed

+53
-12
lines changed

doc/docfx_project/index.md

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,25 @@
66

77
This library allows access via .NET to the iRacing "Data API". These APIs allow a properly authenticated user a supported method of accessing data from the service.
88

9-
[![Nuget](https://img.shields.io/nuget/dt/Aydsko.iRacingData?color=004880&label=NuGet&logo=NuGet)](https://www.nuget.org/packages/Aydsko.iRacingData)
9+
## Authentication Types
1010

11-
## ⚠ Multi-Factor Authentication Requirement
11+
### Legacy Authentication (Username / Password)
1212

13-
iRacing has announced that they now require multi-factor authentication (MFA) for all users by default. This will affect the ability to use the iRacing Data API by logging in with a username or password.
13+
iRacing now requires multi-factor authentication (MFA) for all users by default. This will affect the ability to use the iRacing Data API by logging in with a username or password.
1414

15-
In the immediate future, use of the Data API will be supported by enabling "Legacy Authentication" in your iRacing account settings. iRacing will advise next steps for the authentication of applications for the Data API later on.
15+
Use of the Data API will be supported by enabling "Legacy Authentication" in your iRacing account settings. iRacing will advise next steps for the authentication of applications for the Data API later on.
1616

17-
To continue to use this library you **must** [enable "Legacy Authentication" in your iRacing account settings](https://support.iracing.com/support/solutions/articles/31000173894-enabling-or-disabling-legacy-read-only-authentication) before attempting to authenticate. Please **do not** enable this setting unless you require it, as it may reduce the security on your iRacing account.
17+
To use username & password authentication with this library you **must** [enable "Legacy Authentication" in your iRacing account settings](https://support.iracing.com/support/solutions/articles/31000173894-enabling-or-disabling-legacy-read-only-authentication) before attempting to authenticate. Please **do not** enable this setting unless you require it, as it may reduce the security on your iRacing account.
18+
19+
**⚠ Note:** Legacy authentication will be removed 9 Dec 2025 and one of the OAuth-based authentication methods required. See: https://forums.iracing.com/discussion/84226/legacy-authentication-removal-dec-9-2025
20+
21+
### iRacing OAuth "Password Limited Grant" Authentication
22+
23+
The "Password Limited Grant" is authentication intended for scripts or back-end processes that do not need to access the details of specific users.
24+
25+
Full information is available from the [iRacing.com Auth Service "Password Limited Grant" page](https://oauth.iracing.com/oauth2/book/token_endpoint.html#password-limited-grant).
26+
27+
To use this authentication method you need to contact iRacing who will allocate a "Client ID" and "Client Secret".
1828

1929
## Getting Started
2030

@@ -30,11 +40,29 @@ dotnet add package Aydsko.iRacingData
3040

3141
Register the iRacing Data API client classes with the service provider.
3242

43+
Using legacy username/password authentication:
44+
45+
```csharp
46+
services.AddIRacingDataApi(options =>
47+
{
48+
options.UseProductUserAgent("MyApplicationName", new Version(1, 0));
49+
50+
// Supply your iRacing username and password.
51+
options.UseUsernamePasswordAuthentication(iRacingUsername, iRacingPassword);
52+
});
53+
```
54+
55+
OR
56+
57+
Using iRacing OAuth "Password Limited Grant" authentication:
58+
3359
```csharp
3460
services.AddIRacingDataApi(options =>
3561
{
36-
options.UserAgentProductName = "MyApplicationName";
37-
options.UserAgentProductVersion = new Version(1, 0);
62+
options.UseProductUserAgent("MyApplicationName", new Version(1, 0));
63+
64+
// Supply your iRacing username, password, client id, and client secret.
65+
options.UsePasswordLimitedOAuth(iRacingUsername, iRacingPassword, iRacingClientId, iRacingClientSecret);
3866
});
3967
```
4068

@@ -46,9 +74,6 @@ Use the `IDataClient` from the service provider to authenticate and request data
4674
// Retrieve an instance from the service provider.
4775
var dataClient = serviceProvider.GetRequiredService<IDataClient>();
4876

49-
// Supply your iRacing username and password.
50-
dataClient.UseUsernameAndPassword(iRacingUsername, iRacingPassword);
51-
5277
// Retrieve information about our own account.
5378
var infoResponse = await dataClient.GetMyInfoAsync(cancellationToken);
5479

@@ -79,13 +104,29 @@ Register the iRacing Data API caching client classes with the service provider.
79104
```csharp
80105
services.AddIRacingDataApiWithCaching(options =>
81106
{
82-
options.UserAgentProductName = "MyApplicationName";
83-
options.UserAgentProductVersion = new Version(1, 0);
107+
// [... normal configuration for your chosen authentication type here]
84108
});
85109
```
86110

87111
Then simply use the `IDataClient` as before.
88112

113+
# Versioning
114+
115+
Ideally you should always use the latest version of the library that is available. This is because iRacing will sometimes introduce API changes during a release which make the old code incompatible.
116+
117+
This library will use version numbers will be in the format:
118+
119+
[YY][SS].[R]
120+
121+
Where:
122+
- YY = two digit year
123+
- SS = the iRacing season the library release was made in as a zero-padded number (i.e. 01, 02, 03, 04)
124+
- R = release number, which increments when changes are made although it may not be sequential
125+
126+
Example:
127+
128+
- 2303.1 = changes compatible with iRacing 2023 Season 3 or later, and is release 1 during this season
129+
89130
# Contributing
90131

91132
Before you begin a contribution, please read and ensure you are comfortable with this project's [Code of Conduct](https://github.com/AdrianJSClark/aydsko-iracingdata/blob/main/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)