Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Jan 10, 2018
1 parent f16edf7 commit 879b611
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fint-get-token",
"version": "1.0.0",
"version": "1.0.1",
"description": "Module for retreiving a token from FINT",
"main": "index.js",
"bin": {
Expand Down
23 changes: 23 additions & 0 deletions tst.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(async () => {
const getToken = require('./index')
const options = {
url: 'https://namidp01.rogfk.no/nidp/oauth/nam/token',
credentials: {
client: {
client_id: '6e1cf7b4-b107-42b3-9435-8fda70726c6a',
client_secret: '6y4FUuP9BfAXeVqguNKT0ofToIwN5RdB1PaUvx_nCMiQbH9NeGq3pp0jQB9zOQ0APOxEbodzJXp-8RVux6318A'
},
auth: {
username: 'pwfatut',
password: 'pwfatut',
grant_type: 'password'
}
}
}
try {
const token = await getToken(options)
console.log(token)
} catch (error) {
console.error(error.error.error)
}
})()

0 comments on commit 879b611

Please sign in to comment.