Skip to content

Commit

Permalink
docs(improve-docs): fix markdown and docs
Browse files Browse the repository at this point in the history
see #40
  • Loading branch information
bzums committed May 2, 2017
1 parent 9224a8e commit 63a229f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ getAccessToken({
// all the other config
// ...
realm: EMPLOYEES_REALM,
})
.then(token => {
// ...
});
})
.then(token => {
// ...
});

// instead use this:
getAccessToken({
// all the other config
// ...
queryParams: { realm: '/employees' }
})
.then(token => {
// ...
});
})
.then(token => {
// ...
});
```
See the [changelog](#changelog) for more information.

Expand Down Expand Up @@ -226,9 +226,11 @@ cleanMock();
## Changelog
#### `2.0.0` - **BREAKING**
The (zalando-specific) `realm` property was removed from `OAuthConfig`. Also, the corresponding constants (`SERVICES_REALM` and `EMPLYEES_REALM`) were removed. Instead, you can add the realm (and arbitrary other query parameters) via the `queryParams` property in `OAuthConfig`.
#### `1.0.0` - **BREAKING**
The signature of `requireScopesMiddleware` is now incompatible with previous versions, `precedenceFunction?` is now part of `precedenceOptions?`.
## License
Expand Down
4 changes: 2 additions & 2 deletions src/oauth-tooling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ function requestAccessToken(bodyObject: any, authorizationHeaderValue: string,
/**
* Build url string to request access token, optionally with given query parameters.
*
* @param accessTokenEndpoint
* @param queryParams
* @param accessTokenEndpoint string
* @param queryParams Object key value paris which will be added as query parameters
* @returns {string}
*/
function buildRequestAccessTokenUrl(accessTokenEndpoint: string, queryParams?: Object): string {
Expand Down

0 comments on commit 63a229f

Please sign in to comment.