Skip to content

KSF-Media/persona-javascript-client

Repository files navigation

persona

Persona - JavaScript client for persona KSF Media unified login service This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.3.0
  • Package version: 1.3.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install persona --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your persona from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('persona') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/KSF-Media/persona-javascript-client then install it via:

    npm install KSF-Media/persona-javascript-client --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Persona = require('persona');


var api = new Persona.AccountApi()
var body = "body_example"; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.accountPasswordCheckTokenPost(body, callback);

Documentation for API Endpoints

All URIs are relative to http://http:/v1

Class Method HTTP request Description
Persona.AccountApi accountPasswordCheckTokenPost POST /account/password/check-token Validate password reset token
Persona.AccountApi accountPasswordForgotPost POST /account/password/forgot Request password reset link
Persona.AccountApi accountPasswordResetPost POST /account/password/reset Reset a forgotten password with a token
Persona.AdminApi adminFreePassDelete DELETE /admin/free-pass Revokes an existing free pass
Persona.AdminApi adminFreePassPut PUT /admin/free-pass Creates a free pass to an article
Persona.AdminApi adminFreePassesGet GET /admin/free-passes Lists all free passes
Persona.AdminApi adminSearchPost POST /admin/search Search for users
Persona.AdminApi adminTransferPassiveSubscribersListidPost POST /admin/transfer-passive-subscribers/{listid} Transfers passive customers from Kayak to Mailchimp
Persona.AdminApi adminUserPost POST /admin/user Create a new user with admin options.
Persona.AdminApi adminUserUuidDelete DELETE /admin/user/{uuid} Delete user
Persona.EntitlementsApi entitlementsAllowDelete DELETE /entitlements/allow Remove an entitlement
Persona.EntitlementsApi entitlementsAllowGet GET /entitlements/allow Check if global entitlements are enabled
Persona.EntitlementsApi entitlementsAllowPost POST /entitlements/allow Add an entitlement for all users
Persona.EntitlementsApi entitlementsAllowUuidPost POST /entitlements/allow/{uuid} Grant product access to a customer
Persona.EntitlementsApi entitlementsFreePassGet GET /entitlements/free-pass Verify given free pass hash
Persona.EntitlementsApi entitlementsGet GET /entitlements List all entitlements
Persona.EntitlementsApi entitlementsGlobalGet GET /entitlements/global Lists all past and future global entitlements
Persona.IdentificationApi identificationLoginGet GET /identification/login Authenticate with OpenID Connect
Persona.IdentificationApi identificationLoginMonitorGet GET /identification/login/monitor Get token for off band response login flow monitor
Persona.IdentificationApi identificationLoginReturnGet GET /identification/login/return Redirect endpoint for OpenID Connect
Persona.IdentificationApi identificationUserStampUuidPost POST /identification/user/stamp/{uuid} Query when the strong identification was last updated
Persona.LoginApi loginIpGet GET /login/ip Login with IP
Persona.LoginApi loginPost POST /login Login with email and password
Persona.LoginApi loginSsoPost POST /login/sso Disabled. Always returns 403.
Persona.LoginApi loginUuidDelete DELETE /login/{uuid} Logout
Persona.UsersApi usersPost POST /users Create a new user.
Persona.UsersApi usersTemporaryPost POST /users/temporary Create a new user with email.
Persona.UsersApi usersUuidEntitlementGet GET /users/{uuid}/entitlement Get users entitlements.
Persona.UsersApi usersUuidGdprPut PUT /users/{uuid}/gdpr Updates the GDPR consent settings for a given user.
Persona.UsersApi usersUuidGet GET /users/{uuid} Get user by UUID.
Persona.UsersApi usersUuidLegalPut PUT /users/{uuid}/legal Updates the legal consent settings for a given user.
Persona.UsersApi usersUuidNewslettersGet GET /users/{uuid}/newsletters Get newsletter subscriptions
Persona.UsersApi usersUuidNewslettersPut PUT /users/{uuid}/newsletters Update newsletter subscriptions
Persona.UsersApi usersUuidPasswordPut PUT /users/{uuid}/password Set / Change user password
Persona.UsersApi usersUuidPatch PATCH /users/{uuid} Update a user
Persona.UsersApi usersUuidPaymentsGet GET /users/{uuid}/payments Get user's subscriptions and payment events
Persona.UsersApi usersUuidScopeGet GET /users/{uuid}/scope Check if user has valid token for a scope
Persona.UsersApi usersUuidSubscriptionsSubsnoAddressChangeDelete DELETE /users/{uuid}/subscriptions/{subsno}/addressChange Delete temporary address change for subscription
Persona.UsersApi usersUuidSubscriptionsSubsnoAddressChangePatch PATCH /users/{uuid}/subscriptions/{subsno}/addressChange Edit temporary address change dates of a subscription
Persona.UsersApi usersUuidSubscriptionsSubsnoAddressChangePost POST /users/{uuid}/subscriptions/{subsno}/addressChange Make a temporary address change for a subscription
Persona.UsersApi usersUuidSubscriptionsSubsnoCancelPut PUT /users/{uuid}/subscriptions/{subsno}/cancel Cancels user subscription
Persona.UsersApi usersUuidSubscriptionsSubsnoPausePatch PATCH /users/{uuid}/subscriptions/{subsno}/pause Edit pause duration
Persona.UsersApi usersUuidSubscriptionsSubsnoPausePost POST /users/{uuid}/subscriptions/{subsno}/pause Pause users subscription
Persona.UsersApi usersUuidSubscriptionsSubsnoReclamationPost POST /users/{uuid}/subscriptions/{subsno}/reclamation Create a new delivery reclamation for a subscription
Persona.UsersApi usersUuidSubscriptionsSubsnoReclamationsReclaimnoGet GET /users/{uuid}/subscriptions/{subsno}/reclamations/{reclaimno} Get a delivery reclamation
Persona.UsersApi usersUuidSubscriptionsSubsnoUnpausePost POST /users/{uuid}/subscriptions/{subsno}/unpause Unpause users subscription

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

Autogenerated JavaScript client for our login service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published