BizDoc.Core.Okta
6.3.0
See the version list below for details.
dotnet add package BizDoc.Core.Okta --version 6.3.0
NuGet\Install-Package BizDoc.Core.Okta -Version 6.3.0
<PackageReference Include="BizDoc.Core.Okta" Version="6.3.0" />
paket add BizDoc.Core.Okta --version 6.3.0
#r "nuget: BizDoc.Core.Okta, 6.3.0"
// Install BizDoc.Core.Okta as a Cake Addin #addin nuget:?package=BizDoc.Core.Okta&version=6.3.0 // Install BizDoc.Core.Okta as a Cake Tool #tool nuget:?package=BizDoc.Core.Okta&version=6.3.0
Okta for BizDoc
BizDoc supports Okta for both authentication and authorization, in one of two configurations: server flow or client flow.
Server flow redirects unauthorized users to Okta sign-in page on Okta domain, and handles the redirect. Client flow prompts unauthorized users for credentials in an hosted widget, and negotiate with Okta on the background.
- For both modes, install BizDoc Nuget package:
dotnet add package BizDoc.Core.Okta
- Add Okta application. If using server mode, choose Web Application. If using client mode, choose ODIC - OpenID Connect, and select SPA.
Okta sign-in redirect url should match "/authorization-code/callback" on server mode, and no path for client mode.
Create an API Token to allow BizDoc to retrieve users information.
- In startup.cs, add Okta service.
For server flow, use AddOktaRedirect:
AddBizDoc(o=> {
o.ApplicationUri = "https://app-domain";
})
.AddOktaServer(o=> {
o.ApiToken = "api-token";
o.Domain = "domain-name";
o.ClientId = "client-id";
o.ClientSecret = "client-secret";
});
...
UseBizDoc().
.UseOktaServer();
For client mode, use AddOkta:
AddBizDoc(...)
.AddOkta(o=> {
o.ApiToken = "api-token";
o.Domain = "domain-name";
}).
UseIdentityProvider();
The UseIdentityProvider() method registers an identity provider which retrieve user information from Okta. To use a different provider, while still authenticating via Okta, see Implementing Identity Provider.
- Client mode only, install Angular package:
npm i @bizdoc/okta
Add Okta configuration in Angular app.module:
OktaModule.forRoot({
domain: 'domain-name',
clientId: 'client-id'
})
Roles
In order to map user groups to BizDoc roles for authorization purposes, add a new claim to Okta Authorization Server with the following specifications.
Property | Value |
---|---|
Name | bizdoc.roles |
Include in token type | ID Token |
Value type | Groups |
Filter | Matches regex, .* |
Include in | Any scope |
System
Add an attribute to either application profile or all profiles and set its type to boolean. Add a claim in API server that map to the profile attribute you created.
Property | Value |
---|---|
Name | bizdoc.admin |
Include in token type | ID Token |
Value type | Expression |
Value | user.{attr-name-here} |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
- Microsoft.AspNetCore.Authentication.Cookies (>= 2.2.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 6.0.1)
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 6.0.1)
- Okta.Sdk (>= 5.3.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
6.8.1 | 486 | 10/18/2022 | |
6.8.0 | 401 | 10/16/2022 | |
6.7.3 | 404 | 8/8/2022 | |
6.7.2 | 389 | 7/21/2022 | |
6.7.1 | 408 | 7/12/2022 | |
6.6.5 | 420 | 7/3/2022 | |
6.6.4 | 417 | 6/26/2022 | |
6.6.3 | 380 | 6/26/2022 | |
6.6.2 | 389 | 6/15/2022 | |
6.6.1 | 404 | 5/28/2022 | |
6.6.0 | 400 | 5/20/2022 | |
6.5.3 | 422 | 4/27/2022 | |
6.5.2 | 420 | 4/13/2022 | |
6.5.1 | 403 | 4/6/2022 | |
6.5.0 | 432 | 4/5/2022 | |
6.4.0 | 440 | 3/8/2022 | |
6.3.5 | 420 | 2/16/2022 | |
6.3.4 | 420 | 2/10/2022 | |
6.3.3 | 417 | 2/7/2022 | |
6.3.2 | 448 | 2/2/2022 | |
6.3.1 | 443 | 1/31/2022 | |
6.3.0 | 446 | 1/21/2022 | |
6.2.1 | 457 | 1/15/2022 | |
6.2.0 | 272 | 1/7/2022 | |
6.2.0-prerelease | 164 | 1/5/2022 | |
6.0.5 | 304 | 12/14/2021 | |
6.0.4 | 299 | 12/1/2021 | |
6.0.3 | 327 | 11/22/2021 | |
6.0.2 | 296 | 11/16/2021 | |
6.0.1 | 315 | 11/13/2021 | |
6.0.0 | 322 | 11/10/2021 | |
5.3.8 | 392 | 11/3/2021 | |
5.3.6 | 360 | 11/2/2021 | |
5.3.5 | 528 | 10/30/2021 | |
5.3.4 | 466 | 10/25/2021 | |
5.3.3 | 356 | 10/17/2021 | |
5.3.2 | 343 | 10/14/2021 | |
5.3.1 | 396 | 10/12/2021 | |
5.3.0 | 358 | 10/12/2021 | |
5.2.6 | 385 | 10/11/2021 | |
5.2.5 | 393 | 10/10/2021 | |
5.2.4 | 326 | 10/7/2021 | |
5.2.3 | 334 | 10/5/2021 | |
5.2.2 | 374 | 9/27/2021 | |
5.2.1 | 323 | 9/23/2021 | |
5.2.0 | 354 | 9/22/2021 | |
5.1.11 | 343 | 9/16/2021 | |
5.1.10 | 331 | 9/16/2021 | |
5.1.9 | 336 | 9/15/2021 | |
5.1.8 | 340 | 9/14/2021 | |
5.1.7 | 356 | 9/13/2021 | |
5.1.6 | 361 | 9/13/2021 | |
5.1.5 | 390 | 9/13/2021 | |
5.1.4 | 382 | 9/12/2021 | |
5.1.3 | 377 | 9/12/2021 | |
5.1.2 | 351 | 8/10/2021 | |
5.1.1 | 321 | 4/1/2021 | |
5.1.0 | 375 | 4/1/2021 | |
5.0.1 | 399 | 3/9/2021 | |
5.0.0 | 367 | 1/13/2021 | |
3.2.2 | 465 | 12/17/2020 | |
3.2.1 | 459 | 11/25/2020 | |
3.2.0 | 439 | 11/25/2020 | |
3.1.3 | 504 | 9/4/2020 | |
3.1.2 | 477 | 8/16/2020 | |
3.1.1 | 544 | 3/5/2020 | |
3.0.0 | 592 | 11/11/2019 | |
1.0.3 | 662 | 6/6/2019 | |
1.0.2 | 713 | 5/26/2019 | |
1.0.0 | 762 | 4/11/2019 |