@aaiosp/websdk
v0.0.4
Published
The official Javascript client library for the AAI one-stop flow.
Downloads
2
Readme
aai osp SDK
The official Javascript client library for the AAI one-stop flow.
Table of Contents
Install
npm install @aaiosp/websdk
Documentation
The module provides a sdk for the AAI OSP flow. For complete information about the API, head to the docs.
Getting Started
To open the flow you must create a osp
object.
import OSP from '@aaiosp/websdk'
const container = document.querySelector('#app')
const osp = OSP.init(container!, {
token: 'XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX', // Obtain the token according to the integration doc
environment: 'sandbox',
language: 'en',
onReady() {
console.log('onReady')
osp.open()
},
onLoad() {
console.log('onload')
},
onError() {
console.error('onerror')
},
onEvent(data) {
console.log(`onEvent:${JSON.stringify(data)}`)
},
onComplete(){
console.log('workflow complete!')
}
})