<commit_before># Passport-Keystone

OpenStack Keystone authentication strategy for [Passport](http://passportjs.org/) and Node.js

## Install

    $ npm install passport-keystone

## Usage

#### Configure Strategy

The keystone authentication strategy authenticates users using a username and
password.  The strategy requires a `verify` callback, which accepts these
credentials and calls `done` providing a user.

    passport.use(new KeystoneStrategy({
       region: your.region,
       url: your.authUrl,
       usernameField: 'username',
       passwordField: 'password'
      },
      function(user, done) {
        return done(null, user);
      }
    ));

#### Authenticate Requests

Use `passport.authenticate()`, specifying the `'keystone'` strategy, to
authenticate requests.

For example, as route middleware in an [Express](http://expressjs.com/)
application:

    app.post('/login',
      passport.authenticate('keystone', { failureRedirect: '/login' }),
      function(req, res) {
        res.redirect('/');
      });
<commit_msg>fix config object documentation<commit_after># Passport-Keystone

OpenStack Keystone authentication strategy for [Passport](http://passportjs.org/) and Node.js

## Install

    $ npm install passport-keystone

## Usage

#### Configure Strategy

The keystone authentication strategy authenticates users using a username and
password.  The strategy requires a `verify` callback, which accepts these
credentials and calls `done` providing a user.

    passport.use(new KeystoneStrategy({
       region: your.region,
       authUrl: your.authUrl
      },
      function(user, done) {
        return done(null, user);
      }
    ));

#### Authenticate Requests

Use `passport.authenticate()`, specifying the `'keystone'` strategy, to
authenticate requests.

For example, as route middleware in an [Express](http://expressjs.com/)
application:

    app.post('/login',
      passport.authenticate('keystone', { failureRedirect: '/login' }),
      function(req, res) {
        res.redirect('/');
      });

{'fraction_non_alphanumeric': 0.11643835616438356, 'fraction_numerical': 0.0, 'mean_word_length': 3.564732142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '996563', 'n_tokens_mistral': 588, 'n_tokens_neox': 553, 'n_words': 171}