Skip to content

Commit d3ba9d9

Browse files
committed
readme
1 parent 5342f2a commit d3ba9d9

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

README.MD

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Successfully tested with Angular 4.3+, Angular 5 and its Router,PathLocationStra
3131

3232
## New Features in Version 3.1
3333

34-
34+
See [Release Notes](https://github.com/manfredsteyer/angular-oauth2-oidc/releases/tag/3.1)
3535

3636
## New Features in Version 3.0
3737

angular-oauth2-oidc/README.MD

+27-8
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Support for OAuth 2 and OpenId Connect (OIDC) in Angular.
66

77
## Credits
88

9-
- [generator-angular2-library](https://github.com/jvandemo/generator-angular2-library) for scaffolding a angular library
9+
- [generator-angular2-library](https://github.com/jvandemo/generator-angular2-library) for scaffolding an Angular library
1010
- [jsrasign](https://kjur.github.io/jsrsasign/) for validating token signature and for hashing
11-
- [Identity Server](https://github.com/identityserver) (used for Testing with an .NET/.NET Core Backend)
12-
- [Keycloak (Redhad)](http://www.keycloak.org/) for Testing with Java
11+
- [Identity Server](https://github.com/identityserver) (used for testing with an .NET/.NET Core Backend)
12+
- [Keycloak (Redhat)](http://www.keycloak.org/) for testing with Java
1313

1414
## Resources
1515

@@ -19,10 +19,19 @@ https://github.com/manfredsteyer/angular-oauth2-oidc
1919
- Source Code Documentation
2020
https://manfredsteyer.github.io/angular-oauth2-oidc/angular-oauth2-oidc/docs/
2121

22+
## Tutorials
23+
24+
* [Angular Authentication with OpenID Connect and Okta in 20 Minutes](https://developer.okta.com/blog/2017/04/17/angular-authentication-with-oidc)
25+
* [Add Authentication to Your Angular PWA](https://developer.okta.com/blog/2017/06/13/add-authentication-angular-pwa)
26+
* [Build an Ionic App with User Authentication](https://developer.okta.com/blog/2017/08/22/build-an-ionic-app-with-user-authentication)
27+
2228
## Tested Environment
2329

2430
Successfully tested with Angular 4.3+, Angular 5 and its Router,PathLocationStrategy as well as HashLocationStrategy and CommonJS-Bundling via webpack. At server side we've used IdentityServer (.NET/ .NET Core) and Redhat's Keycloak (Java).
2531

32+
## New Features in Version 3.1
33+
34+
See [Release Notes](https://github.com/manfredsteyer/angular-oauth2-oidc/releases/tag/3.1)
2635

2736
## New Features in Version 3.0
2837

@@ -41,7 +50,7 @@ See [Release Notes](https://github.com/manfredsteyer/angular-oauth2-oidc/release
4150
- Token Refresh for Implicit Flow by implementing "silent refresh"
4251
- Validating the signature of the received id_token
4352
- Providing Events via the observable ``events``.
44-
- The event ``token_expires`` can be used togehter with a silent refresh to automatically refresh a token when/ before it expires (see also property ``timeoutFactor``).
53+
- The event ``token_expires`` can be used together with a silent refresh to automatically refresh a token when/ before it expires (see also property ``timeoutFactor``).
4554

4655
## Additional Features
4756
- Logging in via OAuth2 and OpenId Connect (OIDC) Implicit Flow (where user is redirected to Identity Provider)
@@ -188,7 +197,7 @@ export class HomeComponent {
188197
}
189198

190199
public get name() {
191-
let claims = this.oAuthService.getIdentityClaims();
200+
let claims = this.oauthService.getIdentityClaims();
192201
if (!claims) return null;
193202
return claims.given_name;
194203
}
@@ -218,7 +227,7 @@ The following snippet contains the template for the login page:
218227
</div>
219228
```
220229

221-
### Skipping the login form
230+
### Skipping the Login Form
222231

223232
If you don't want to display a login form that tells the user that they are redirected to the identity server, you can use the convenince function ``this.oauthService.loadDiscoveryDocumentAndLogin();`` instead of ``this.oauthService.loadDiscoveryDocumentAndTryLogin();`` when setting up the library.
224233

@@ -235,18 +244,28 @@ var headers = new Headers({
235244
});
236245
```
237246

238-
If you are using the new HttpClient, use the class HttpHeaders instead:
247+
If you are using the new ``HttpClient``, use the class ``HttpHeaders`` instead:
239248

240249
```TypeScript
241250
var headers = new HttpHeaders({
242251
"Authorization": "Bearer " + this.oauthService.getAccessToken()
243252
});
244253
```
245254

255+
Since 3.1 you can also automate this task by switching ``sendAccessToken`` on and by setting ``allowedUrls`` to an array with prefixes for the respective urls. Use lower case for the prefixes.
246256

247-
## Some infos about Routing
257+
```TypeScript
258+
OAuthModule.forRoot({
259+
resourceServer: {
260+
allowedUrls: ['http://www.angular.at/api'],
261+
sendAccessToken: true
262+
}
263+
})
264+
```
248265

266+
## Routing
249267

268+
If you use the ``PathLocationStragegy`` (which is on by default) and have a general catch-all-route (``path: '**'``) you should be fine. Otherwise look up the section ``Routing with the HashStrategy`` in the [documation](https://manfredsteyer.github.io/angular-oauth2-oidc/angular-oauth2-oidc/docs/).
250269

251270

252271
## More Documentation

angular-oauth2-oidc/src/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-oauth2-oidc",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/manfredsteyer/angular-oauth2-oidc"

0 commit comments

Comments
 (0)