# oidc-client-mc

Fork of [oidc-client-js](https://github.com/IdentityModel/oidc-client-js/) that adds the ability to authenticate token 
exchange via http header basic auth as recommended by [rfc](https://tools.ietf.org/html/rfc6749#section-2.3.1)

**Note:** This package has been modified exclusively for testing an OAuth Provider implementation created by the team I 
work
with. No guarantees can be made for production usage.

To toggle the token exchange auth method, use the following property in your oidc settings:
`token_exchange_use_http_header_basic_auth`
The default value is `true` which will pass client credentials for token exhange via an encoded http auth header.

## Install

##### Node.js

Node.js v4.4 or later required.

##### NPM

`npm install oidc-client --save`

**NOTE**: if you're not already using [babel-polyfill](https://www.npmjs.com/package/babel-polyfill) make sure you run
`npm install --save babel-polyfill` as well. Then include it in your build.

##### CommonJS
If you don't use a package manager or a module loader, then you can get the library from the `dist` folder on github [here](dist).

## Including in the browser

If you intend to use this library directly in a browser and are not using UMD/AMD then there is a compiled version in the [~/dist](dist) folder. 
It is already bundled/minified and contains the necessary dependencies and polyfills (mainly for ES6 features such as Promises).

If you are using UMD/AMD and/or you already have included an ES6 polyfill (such as babel-polyfill.js) then you can include the UMD packaged version of the file from the [~/lib](lib) folder.

## Running the Sample

`npm start`

and then browse to [http://localhost:15000](http://localhost:15000).

## Running the Tests

`npm test`

## Docs

Original project docs: Some initial docs are [here](https://github.com/IdentityModel/oidc-client-js/wiki).
