Nondeterministic Polynomial Munchies
Miss any of our Open RFC calls?Watch the recordings here! »

coveo-search-token-generator

0.0.4 • Public • Published

Coveo Search Token Generator

Node.js module that generates Coveo search tokens for a Dynamics portal.

// Decodes the authentication token from the portal and extracts from it the e-mail address of the current user (i.e. the one that made the call).
const portalAuth: IDecodedPortalAuthTokenPayload = await portal.decodeAuthToken(req.headers.authorization);
 
// Fetches a search token from Coveo Cloud providing the current user e-mail (or empty for anonymous users), which then returns the search token.
const coveoSearchToken: string = await coveo.fetchSearchToken(portalAuth.email);

Install

npm install coveo-search-token-generator

Build

To build this lib, open npm on the directory of this file. Then, run the following command :

npm run setup
npm run build

Liability

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Install

npm i coveo-search-token-generator

DownloadsWeekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

18.9 kB

Total Files

17

Last publish

Collaborators

  • avatar