Skip to content

Commit

Permalink
Replace omitted heading fragments.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgwozdz committed Jan 15, 2019
1 parent 0b10f4d commit 23ae059
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions _docs/usage/authorization.md
Expand Up @@ -18,7 +18,7 @@ Each authorization plugin must have a file called `index.js`. Its purpose is to
}
```

### `authenticationSpecification`
### `authenticationSpecification` function

Authorization plugins are required to return a function called "authenticationSpecification". Its purpose is delivery of an object for use in configuring authentication in output-services (e.g., koop-output-geoservices). It should have the following signature:

Expand All @@ -35,7 +35,7 @@ As noted, `authenticationSpecification` returns an object configured with a prov
An example of `authenticationSpecification` is available [here](https://github.com/koopjs/koop-auth-direct-file/blob/master/src/index.js#L44-L56).


### `authenticate`
### `authenticate` function

Authorization plugins are required to return a function called `authenticate`. Its purpose is to validate credentials and, if successful, issue a token for authorizing subsequent resource requests. The `authenticate` function should have the following signature:

Expand All @@ -57,7 +57,7 @@ As noted above, the `authenticate` function should return a promise. If the auth

Authorization plugins are free to validate credentials in any manner. For example, you might check a database for a match of the submitted username and password, or forward the credentials on to a third-party identity-store. [koop-auth-direct-file](https://github.com/koopjs/koop-auth-direct-file) provides an [example](https://github.com/koopjs/koop-auth-direct-file/blob/master/src/index.js#L59-L88) of a very basic credential validation using a simple JSON file-store.

### `authorize`
### `authorize` function

Authorization plugins are required to implement a function called `authorize`. It should accept an argument that can be used to verify the request is being made by an authenticated user (e.g., a token granted after successful authentication). It should have the following function signature:

Expand Down
2 changes: 1 addition & 1 deletion _docs/usage/provider.md
Expand Up @@ -46,7 +46,7 @@ Every provider must have a `Model`. This is where almost all of the business log

_[back to top](#contents)_

### `getData`
### `getData` function

Models are required to implement a function called `getData`. It should fetch data from the remote API, translate the data into GeoJSON (if necessary) and call the `callback` function with the GeoJSON as the second parameter. If there is an error in fetching or processing data from the remote API it should call the `callback` function with an error as the first parameter and stop processing.

Expand Down

0 comments on commit 23ae059

Please sign in to comment.