Skip to content
This repository was archived by the owner on Aug 28, 2023. It is now read-only.

Commit d32e001

Browse files
authoredApr 16, 2020
Merge pull request #488 from cjancsar/patch-1
Remove waffle.io references (dead links)
2 parents 48d44bb + 88e0341 commit d32e001

File tree

1 file changed

+35
-41
lines changed

1 file changed

+35
-41
lines changed
 

‎README.md

+35-41
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,11 @@ Latest version that support's SAML and WSFED - 2.0.3
2222
Minimum recommended version - 1.4.6
2323
You can find the changes for each version in the [change log](https://github.com/AzureAD/passport-azure-ad/blob/master/CHANGELOG.md).
2424

25-
## 3. Contribution History
26-
27-
[![Stories in Ready](https://badge.waffle.io/AzureAD/passport-azure-ad.png?label=ready&title=Ready)](https://waffle.io/AzureAD/passport-azure-ad)
28-
29-
[![Throughput Graph](https://graphs.waffle.io/AzureAD/passport-azure-ad/throughput.svg)](https://waffle.io/AzureAD/passport-azure-ad/metrics)
30-
31-
## 4. Installation
25+
## 3. Installation
3226

3327
$ npm install passport-azure-ad
3428

35-
## 5. Usage
29+
## 4. Usage
3630

3731
This library contains two strategies: OIDCStrategy and BearerStrategy.
3832

@@ -45,11 +39,11 @@ User sends a request to the protected web api which contains an access_token in
4539

4640
We support AAD v1, v2 and B2C tenants for both strategies. Please check out [section 8](#8-samples-and-documentation) for the samples. You can manage v1 tenants and register applications at https://manage.windowsazure.com. For v2 tenants and applications, you should go to https://apps.dev.microsoft.com. For B2C tenants, go to https://manage.windowsazure.com and click 'Manage B2C settings' to register applications and policies.
4741

48-
### 5.1 OIDCStrategy
42+
### 4.1 OIDCStrategy
4943

50-
#### 5.1.1 Configure strategy and provide callback function
44+
#### 4.1.1 Configure strategy and provide callback function
5145

52-
##### 5.1.1.1 Sample using the OIDCStrategy
46+
##### 4.1.1.1 Sample using the OIDCStrategy
5347

5448
```javascript
5549
passport.use(new OIDCStrategy({
@@ -96,7 +90,7 @@ passport.use(new OIDCStrategy({
9690
));
9791
```
9892

99-
##### 5.1.1.2 Options
93+
##### 4.1.1.2 Options
10094

10195
* `identityMetadata` (Required)
10296

@@ -217,7 +211,7 @@ passport.use(new OIDCStrategy({
217211

218212
This value is the clock skew (in seconds) allowed in token validation. It must be a positive integer. The default value is 300 seconds.
219213

220-
##### 5.1.1.3 Verify callback
214+
##### 4.1.1.3 Verify callback
221215

222216
If you set `passReqToCallback` option to false, you can use one of the following signatures for the verify callback
223217

@@ -241,7 +235,7 @@ If you set `passReqToCallback` option to true, you can use one of the following
241235
function(req, profile, done)
242236
```
243237

244-
#### 5.1.1.4 JWE support
238+
#### 4.1.1.4 JWE support
245239

246240
We support encrypted id_token in JWE Compact Serialization format.
247241

@@ -330,7 +324,7 @@ If you set `passReqToCallback` option to true, you can use one of the following
330324
```
331325

332326

333-
#### 5.1.2 Use `passport.authenticate` to protect routes
327+
#### 4.1.2 Use `passport.authenticate` to protect routes
334328

335329
To complete the sample, provide a route that corresponds to the path
336330
configuration parameter that is sent to the strategy:
@@ -362,7 +356,7 @@ app.get('/logout', function(req, res){
362356

363357
```
364358

365-
#### 5.1.3 Options available for `passport.authenticate`
359+
#### 4.1.3 Options available for `passport.authenticate`
366360

367361
* `failureRedirect`: the url redirected to when the authentication fails
368362

@@ -394,7 +388,7 @@ Example:
394388
passport.authenticate('azuread-openidconnect', { tenantIdOrName: 'contoso.onmicrosoft.com' });
395389
```
396390

397-
#### 5.1.4 Session free support
391+
#### 4.1.4 Session free support
398392

399393
Passport framework uses session to keep a persistent login session. As a plug in, we also use session to store state and nonce by default, regardless whether you use { session: false } option in passport.authenticate or not. To be completely session free, you must configure passport-azure-ad to create state/nonce cookie instead of saving them in session. Please follow the following example:
400394

@@ -415,11 +409,11 @@ Passport framework uses session to keep a persistent login session. As a plug in
415409
416410
```
417411

418-
### 5.2 BearerStrategy
412+
### 4.2 BearerStrategy
419413

420-
#### 5.2.1 Configure strategy and provide callback function
414+
#### 4.2.1 Configure strategy and provide callback function
421415

422-
##### 5.2.1.1 Sample using the BearerStrategy
416+
##### 4.2.1.1 Sample using the BearerStrategy
423417

424418
```javascript
425419

@@ -463,7 +457,7 @@ var bearerStrategy = new BearerStrategy(options,
463457
);
464458
```
465459

466-
##### 5.2.1.2 Options
460+
##### 4.2.1.2 Options
467461

468462
* `identityMetadata` (Required)
469463

@@ -538,7 +532,7 @@ var bearerStrategy = new BearerStrategy(options,
538532

539533
This value is the clock skew (in seconds) allowed in token validation. It must be a positive integer. The default value is 300 seconds.
540534

541-
##### 5.2.1.3 Verify callback
535+
##### 4.2.1.3 Verify callback
542536

543537
If you set `passReqToCallback` option to false, you can use the following verify callback
544538

@@ -552,15 +546,15 @@ If you set `passReqToCallback` option to true, you can use the following verify
552546
function(req, token, done)
553547
```
554548

555-
#### 5.2.2 Use `passport.authenticate` to protect resources or APIs
549+
#### 4.2.2 Use `passport.authenticate` to protect resources or APIs
556550

557551
In the following example, we are using passport to protect '/api/tasks'. User sends a GET request to '/api/tasks' with access_token in authorization header or body. Passport validates the access_token, adds the related claims from access_token to `req.user`, and passes the request to listTasks middleware. The listTasks middleware can then read the user information in `req.user` and list all the tasks related to this user. Note that we do authentication every time, so we don't need to keep this user in session, and this can be achieved by using `session: false` option.
558552

559553
```javascript
560554
server.get('/api/tasks', passport.authenticate('oauth-bearer', { session: false }), listTasks);
561555
```
562556

563-
#### 5.2.3 Options available for `passport.authenticate`
557+
#### 4.2.3 Options available for `passport.authenticate`
564558

565559
* `session`: if you don't want a persistent login session, you can use `session: false`. The default value is true.
566560

@@ -572,25 +566,25 @@ Example:
572566
passport.authenticate('oauth-bearer', { session: false });
573567
```
574568

575-
## 6. Test
569+
## 5. Test
576570

577571
In the library root folder, type the following command to install the dependency packages:
578572

579573
```
580574
$ npm install
581575
```
582576

583-
### 6.1. Run all tests except the end to end tests
577+
### 5.1. Run all tests except the end to end tests
584578

585579
Type the following command to run tests:
586580

587581
```
588582
$ npm test
589583
```
590584

591-
### 6.2. Run all tests including the end to end tests
585+
### 5.2. Run all tests including the end to end tests
592586

593-
#### 6.2.1. Create test applications
587+
#### 5.2.1. Create test applications
594588

595589
First you need to register one application in v1 tenant, one in v2 tenant and one in B2C tenant.
596590

@@ -616,13 +610,13 @@ access token for the scope, and use BearerStrategy to validate the scope. Note f
616610
`b2c_params.scopeForOIDC` but only the name in `b2c_params.scopeForBearer`. For example,
617611
`b2c_params.scopeForOIDC=['https://sijun1b2c.onmicrosoft.com/oidc-b2c/read']` and `b2c_params.scopeForBearer=['read']`.
618612

619-
#### 6.2.2. Fill the test parameters
613+
#### 5.2.2. Fill the test parameters
620614

621615
Open `test/End_to_end_test/script.js`, set `is_test_parameters_completed` parameter to true. For `test_parameters` variable, fill in the tenant id/client id/client secret of your applications, and the username/password of your application user.
622616

623617
For `thumbprint` and `privatePEMKey` parameters, you need to specify a certificate for your app and register the public key in Azure Active Directory. `thumbprint` is the base64url format of the thumbprint of the public key, and `privatePEMKey` is the private pem key string. For a v1 tenant, you can follow [this post](http://www.andrewconnell.com/blog/user-app-app-only-permissions-client-credentials-grant-flow-in-azure-ad-office-365-apis) to generate a certificate and register the public key. For a v2 tenant, you can go to your application page in the [v2 portal](https://apps.dev.microsoft.com) and click `Generate New Key Pair`. A certificate will be generated for you to download. The corresponding public key is automatically registered in this case.
624618

625-
#### 6.2.3. Run the tests
619+
#### 5.2.3. Run the tests
626620

627621
Type the following commands to run the tests:
628622

@@ -635,7 +629,7 @@ Type the following commands to run the tests:
635629

636630
Tests will run automatically and in the terminal you can see how many tests are passing/failing. More details can be found [here](https://github.com/AzureAD/passport-azure-ad/blob/master/contributing.md).
637631

638-
## 7. Logging
632+
## 6. Logging
639633
#### Personal Identifiable Information (PII) & Organizational Identifiable Information (OII)
640634

641635
By default, passport-azure-ad logging does not capture or log any PII or OII. The library allows app developers to turn this on by configuring `loggingNoPII` in the config options. By turning on PII or OII, the app takes responsibility for safely handling highly-sensitive data and complying with any regulatory requirements.
@@ -657,7 +651,7 @@ var options = {
657651
```
658652

659653

660-
## 8. Samples and Documentation
654+
## 7. Samples and Documentation
661655

662656
[We provide a full suite of sample applications and documentation on GitHub](https://azure.microsoft.com/en-us/documentation/samples/?service=active-directory)
663657
to help you get started with learning the Azure Identity system. This includes
@@ -667,50 +661,50 @@ OAuth2, OpenID Connect, Graph API, and other awesome features.
667661

668662
Azure Identity samples for this plug-in can be found in the following links:
669663

670-
### 8.1 Samples for [OpenID connect strategy](https://github.com/AzureAD/passport-azure-ad/blob/master/lib/oidcstrategy.js)
664+
### 7.1 Samples for [OpenID connect strategy](https://github.com/AzureAD/passport-azure-ad/blob/master/lib/oidcstrategy.js)
671665

672666
* [sample using v1 endpoint](https://github.com/AzureADQuickStarts/WebApp-OpenIDConnect-NodeJS)
673667

674668
* [sample using v2 endpoint](https://github.com/AzureADQuickStarts/AppModelv2-WebApp-OpenIDConnect-nodejs)
675669

676670
* [sample using B2C tenant](https://github.com/AzureADQuickStarts/B2C-WebApp-OpenIDConnect-NodeJS)
677671

678-
### 8.2 Samples for [Bearer strategy](https://github.com/AzureAD/passport-azure-ad/blob/master/lib/bearerstrategy.js)
672+
### 7.2 Samples for [Bearer strategy](https://github.com/AzureAD/passport-azure-ad/blob/master/lib/bearerstrategy.js)
679673

680674
* [sample using v1 endpoint](https://github.com/AzureADQuickStarts/WebAPI-Bearer-NodeJS)
681675

682676
* [sample using v2 endpoint](https://github.com/AzureADQuickStarts/AppModelv2-WebAPI-nodejs)
683677

684678
* [sample using B2C tenant](https://github.com/AzureADQuickStarts/B2C-WebApi-Nodejs)
685679

686-
## 9. Community Help and Support
680+
## 8. Community Help and Support
687681

688682
We leverage [Stack Overflow](http://stackoverflow.com/) to work with the community on supporting Azure Active Directory and its SDKs, including this one. We highly recommend you ask your questions on Stack Overflow (we're all on there!) Also browser existing issues to see if someone has had your question before.
689683

690684
We recommend you use the "msal" tag so we can see it! Here is the latest Q&A on Stack Overflow for MSAL: [http://stackoverflow.com/questions/tagged/msal](http://stackoverflow.com/questions/tagged/msal)
691685

692-
## 10. Security Reporting
686+
## 9. Security Reporting
693687

694688
If you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.
695689

696-
## 11. Contributing
690+
## 10. Contributing
697691

698692
All code is licensed under the MIT license and we triage actively on GitHub. We enthusiastically welcome contributions and feedback. You can clone the repo and start contributing now.
699693

700694
More details [about contribution](https://github.com/AzureAD/passport-azure-ad/blob/master/contributing.md)
701695

702-
## 12. Releases
696+
## 11. Releases
703697

704698
Please check the [releases](https://github.com/AzureAD/passport-azure-ad/releases) for updates.
705699

706-
## 13. Acknowledgements
700+
## 12. Acknowledgements
707701

708702
The code is based on Henri Bergius's [passport-saml](https://github.com/bergie/passport-saml) library and Matias Woloski's [passport-wsfed-saml2](https://github.com/auth0/passport-wsfed-saml2) library as well as Kiyofumi Kondoh's [passport-openid-google](https://github.com/kkkon/passport-google-openidconnect).
709703

710-
## 14. License
704+
## 13. License
711705
Copyright (c) Microsoft Corp. All rights reserved. Licensed under the MIT License;
712706

713-
## 15. Microsoft Open Source Code of Conduct
707+
## 14. Microsoft Open Source Code of Conduct
714708

715709
We Value and Adhere to the Microsoft Open Source Code of Conduct
716710

0 commit comments

Comments
 (0)
This repository has been archived.