Skip to content

Commit

Permalink
Introduce "JTI Claim as a string instead of guid" (#682) external con…
Browse files Browse the repository at this point in the history
…tribution (#685)

* JTI Claim as a string instead of guid

* - Test third party contribution
- Update templates to port solution in codegen process
- Update version

---------

Co-authored-by: Sachin Satav <[email protected]>
  • Loading branch information
laura-rodriguez and sachinsatav authored Dec 15, 2023
1 parent 7e3133b commit 3afa851
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,6 @@ FodyWeavers.xsd
/tools/docfx.console.2.51.0
/tools/nuget.exe
/tools/packages.config.md5sum

# Rider
.idea/
2 changes: 1 addition & 1 deletion API_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Allows customers to easily access the Okta Management APIs
This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 5.1.0
- SDK version: 7.0.1
- SDK version: 7.0.2
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
For more information, please visit [https://developer.okta.com/](https://developer.okta.com/)

Expand Down
2 changes: 1 addition & 1 deletion openapi3/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"packageName" : "Okta.Sdk",
"outputDir" : "../",
"inputSpec" : "./management.yaml",
"packageVersion" : "7.0.1",
"packageVersion" : "7.0.2",
"packageDescription" : "Official .NET SDK for the Okta API",
"packageTitle" : "Official .NET SDK for the Okta API",
"packageCompany" : "Okta, Inc.",
Expand Down
2 changes: 1 addition & 1 deletion openapi3/templates/DefaultJwtGenerator.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace {{packageName}}.Client
{ "exp", (int)timeSpanExp.TotalSeconds },
{ "iss", _configuration.ClientId },
{ "aud", $"{ClientUtils.EnsureTrailingSlash(_configuration.OktaDomain)}oauth2/v1/token" },
{ "jti", Guid.NewGuid() },
{ "jti", Guid.NewGuid().ToString() },
};

var jsonWebKey = new Microsoft.IdentityModel.Tokens.JsonWebKey(JsonConvert.SerializeObject(_configuration.PrivateKey));
Expand Down
4 changes: 2 additions & 2 deletions src/Okta.Sdk/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "7.0.1";
public const string Version = "7.0.2";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -758,7 +758,7 @@ public static string ToDebugReport()
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 5.1.0\n";
report += " SDK Package Version: 7.0.1\n";
report += " SDK Package Version: 7.0.2\n";

return report;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Okta.Sdk/Client/DefaultJwtGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public string GenerateSignedJWT()
{ "exp", (int)timeSpanExp.TotalSeconds },
{ "iss", _configuration.ClientId },
{ "aud", $"{ClientUtils.EnsureTrailingSlash(_configuration.OktaDomain)}oauth2/v1/token" },
{ "jti", Guid.NewGuid() },
{ "jti", Guid.NewGuid().ToString() },
};

var jsonWebKey = new Microsoft.IdentityModel.Tokens.JsonWebKey(JsonConvert.SerializeObject(_configuration.PrivateKey));
Expand Down
2 changes: 1 addition & 1 deletion src/Okta.Sdk/Okta.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Description>Official .NET SDK for the Okta API</Description>
<Copyright>Okta, Inc.</Copyright>
<RootNamespace>Okta.Sdk</RootNamespace>
<Version>7.0.1</Version>
<Version>7.0.2</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Okta.Sdk.xml</DocumentationFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
Expand Down

0 comments on commit 3afa851

Please sign in to comment.