You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`QAToolKit.Auth` is a .NET Standard 2.1 library, that retrieves the JWT access tokens from different identity providers.
9
+
`QAToolKit.Auth` is a .NET Standard 2.1 library, that retrieves the JWT access tokens from different identity providers. This library should only be used for testing software and not in applications to retrieve the token.
10
10
11
11
Currently it supports next Identity providers and Oauth2 flows:
12
-
-`Keycloak`: Library supports Keycloak [client credentials flow](https://tools.ietf.org/html/rfc6749#section-4.4) or `Protection API token (PAT)` flow. Additionally you can replace the PAT with user token by exchanging the token.
-`Identity Server 4`: Library supports [Identity Server 4](https://identityserver.io/) client credentials [flow](https://identityserver4.readthedocs.io/en/latest/quickstarts/1_client_credentials.html)
12
+
-`Keycloak`: Library supports:
13
+
-[client credentials flow](https://tools.ietf.org/html/rfc6749#section-4.4) or `Protection API token (PAT)` flow. Additionally you can replace the PAT with user token by exchanging the token.
Supported .NET frameworks and standards: `netstandard2.0`, `netstandard2.1`, `netcoreapp3.1`, `net5.0`.
17
23
@@ -23,7 +29,7 @@ Get in touch with me on:
23
29
24
30
## 1. Keycloak support
25
31
26
-
Keycloak support is limited to the `client credential` or `Protection API token (PAT)` flow in combination with `token exchange`.
32
+
Keycloak support is limited to the `client credential` or `Protection API token (PAT)` flow in combination with `token exchange`. Additionally you can also get the token by using `resource owner password credentials grant`.
27
33
28
34
### 1.1. Client credential flow
29
35
@@ -38,7 +44,7 @@ curl -X POST \
38
44
39
45
Read [more](https://www.keycloak.org/docs/latest/authorization_services/#_service_protection_whatis_obtain_pat) here in the Keycloak documentation.
40
46
41
-
Now let's retrive a PAT token with QAToolKit Auth libraray:
47
+
Now let's retrive a PAT token with QAToolKit Auth library:
42
48
43
49
```csharp
44
50
varauth=newKeycloakAuthenticator(options=>
@@ -80,9 +86,25 @@ var token = await auth.GetAccessToken();
Under the hood it's the same code that retrieves the `client credentials flow` access token, but authenticator is explicit for Identity Server 4.
107
+
Under the hood it's the same code that retrieves the `client credentials flow` access token, but authenticator is explicit for Identity Server 4. Additionally you can also get the token by using `resource owner password`.
86
108
87
109
```csharp
88
110
varauth=newIdentityServer4Authenticator(options=>
@@ -96,9 +118,25 @@ var auth = new IdentityServer4Authenticator(options =>
Under the hood it's the same code that retrieves the `client credentials flow` access token, but authenticator is explicit for Azure B2C.
139
+
Under the hood it's the same code that retrieves the `client credentials flow` access token, but authenticator is explicit for Azure B2C. Additionally you can also get the token by using `resource owner password credentials flow`.
102
140
103
141
Azure B2C client credentials flow needs a defined scope which is usually `https://graph.windows.net/.default`.
104
142
@@ -115,10 +153,26 @@ var auth = new AzureB2CAuthenticator(options =>
0 commit comments