hibb-login

1.3.1 • Public • Published

Huygens ING Backbone Login

View, model and logic for logging in.

Initialize

# Require the module. 
LoginComponent = require 'hibb-login'
 
# Init the component with the type of logins you need. 
LoginComponent.init
    basic:
        url: "http://some-url-for-basic-authentication"
    federated:
        url: "http://some-url-for-federated-authentication"
 
# Create the user. 
LoginComponent.createUser
    tokenPrefix: "some-prefix"
    url: -> "http://some-url-to-get-user-data"
    headers:
        KEY: "value"

Other methods

# Get the user. 
LoginComponent.getUser()
 
# Get the token. 
LoginComponent.getUser().getToken()
 
# Get the login view. 
LoginComponent.getLoginView
    title: "Login"
    modal: true

Changelog

v1.3.1

  • ✨ Add token type to prefix token

v1.2.1

  • Add dist dir to git

v1.2.0

  • ✨ Add button to request access to federated login

Readme

Keywords

none

Package Sidebar

Install

npm i hibb-login

Weekly Downloads

1

Version

1.3.1

License

ISC

Last publish

Collaborators

  • gijsjan