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
Besides configuring the keycloak lib in your application it is also necessary to setup the
101
-
access for the account and the client applications that you intend to protect.
101
+
access - scope for the **account**client.
102
102
103
-
In this documentation we are supposing that you already installed, configured your Keycloak
104
-
instance and created the client app.
103
+
In this documentation we suppose that you already installed and configured your Keycloak
104
+
instance, as well created the client app.
105
105
106
-
> TODO add screens
106
+
**Hint:** If you need to create an environment for testing purposes, try out the [Keycloak demo](http://www.keycloak.org/downloads.html).
107
107
108
-
There is also a setup in [Keycloak](http://www.keycloak.org/) to be done, giving the right
108
+
109
+
#### Client configuration
110
+
111
+
When requesting the method to get the User's Profile, the client app should have the scope and access to the account **view-profile** role. To do it, access **Clients**:arrow_right:**My-app**:arrow_right:**Scope**. Select the **account** app in Client Roles and assign the view-profile role.
@@ -151,15 +156,36 @@ export class AppAuthGuard extends KeycloakAuthGuard {
151
156
}
152
157
```
153
158
154
-
155
-
156
159
## HttpClient Interceptor
157
160
158
-
> TODO documentation
161
+
By default all HttpClient requests will add the Authorization header in the format of: Authorization: Bearer ***TOKEN***.
162
+
163
+
There is also the possibility to exclude a list of URLs that should not have the authorization header. The excluded list must be informed in the keycloak initialization. For example:
164
+
```js
165
+
try {
166
+
awaitkeycloak.init({
167
+
config: {
168
+
url:'http://localhost:8080/auth',
169
+
realm:'your-realm',
170
+
clientId:'client-id'
171
+
},
172
+
initOptions: {
173
+
onLoad:'login-required',
174
+
checkLoginIframe:false
175
+
},
176
+
bearerExcludedUrls: [
177
+
'/assets',
178
+
'/clients/public'
179
+
],
180
+
});
181
+
resolve();
182
+
} catch (error) {}
183
+
```
159
184
160
185
## Contributing
161
186
162
-
> TODO documentation
187
+
If you want to contribute to the project, please check out the [contributing](CONTRIBUTING.md)
0 commit comments