1.1.25 • Published 7 years ago

@gaincompliance/hapi-auth-stormpath v1.1.25

Weekly downloads
30
License
MIT
Repository
github
Last release
7 years ago

hapi-auth-stormpath

Stormpath authentication plugin for hapi

npm license

Build Status Codecov

Commitizen friendly semantic-release greenkeeper badge

Installation

$ npm install @gaincompliance/hapi-auth-stormpath -S

Usage

Include this plugin in the manifest of your hapi application to make the Stormpath authentication scheme available to your application. When registered for a route, a user will be directed to Stormpath's ID Site for your registered application to authenticate.

Once the scheme has been registered, register a strategy that uses the stormpath scheme provided by this plugin.

Configuration

When registering the strategy, be sure to provide the following required configuration:

  • apiKeyId (required) - the api key ID for your Stormpath application
  • apiKeySecret (required) - the api key secret from your Stormpath application
  • applicationHref (required) - the url that identifies your application according to the Stormpath API
  • returnUrl (required) - the fully qualified url that ID Site should send the user back to after authentication

    Example

export function register(server, options, next) {
  server.auth.strategy('stormpath', 'stormpath', {
    apiKeyId: process.env.SP_API_KEY_ID,
    apiKeySecret: process.env.SP_API_KEY_SECRET,
    applicationHref: `https://api.stormpath.com/v1/applications/${process.env.STORMPATH_APPLICATION_ID}`,
    returnUrl: 'https://your.site.com/login'
  });

  next();
}

register.attributes = {
  name: 'authentication-strategy'    
};
1.1.25

7 years ago

1.1.24

7 years ago

1.1.23

7 years ago

1.1.22

7 years ago

1.1.21

7 years ago

1.1.20

7 years ago

1.1.19

7 years ago

1.1.18

7 years ago

1.1.17

7 years ago

1.1.16

7 years ago

1.1.15

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago