n8n-nodes-keycloak
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -50,2 +50,17 @@ "use strict"; | ||
{ | ||
displayName: 'Username', | ||
name: 'username', | ||
type: 'string', | ||
placeholder: 'name@email.com', | ||
default: '', | ||
displayOptions: { | ||
show: { | ||
grantType: [ | ||
'password' | ||
] | ||
} | ||
}, | ||
description: 'The Keycloak username', | ||
}, | ||
{ | ||
displayName: 'Email', | ||
@@ -69,2 +84,5 @@ name: 'email', | ||
type: 'string', | ||
typeOptions: { | ||
password: true | ||
}, | ||
default: '', | ||
@@ -100,5 +118,2 @@ displayOptions: { | ||
const grantType = this.getNodeParameter('grantType', 0); | ||
const email = this.getNodeParameter('email', 0); | ||
const password = this.getNodeParameter('password', 0); | ||
const audiance = this.getNodeParameter('audiance', 0); | ||
const credentials = await this.getCredentials('keycloakCredentialsApi'); | ||
@@ -111,4 +126,9 @@ let token = ""; | ||
let body = `grant_type=${grantType}&client_id=${credentials.clientId}&client_secret=${credentials.clientSecret}`; | ||
if (grantType == 'password') | ||
body = `grant_type=${grantType}&audiance=${audiance}&email=${email}&password=${password}`; | ||
if (grantType == 'password') { | ||
const email = this.getNodeParameter('email', 0); | ||
const password = this.getNodeParameter('password', 0); | ||
const audiance = this.getNodeParameter('audiance', 0); | ||
const username = this.getNodeParameter('username', 0); | ||
body = `grant_type=${grantType}&audiance=${audiance}&username=${username}&email=${email}&password=${password}`; | ||
} | ||
const requestObj = { | ||
@@ -115,0 +135,0 @@ method: 'POST', |
{ | ||
"name": "n8n-nodes-keycloak", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "This npm module provides a set of nodes to interact with Keycloak, offering functionalities ranging from email verification to token validation and sending emails.\n", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "n8n-nodes-keycloak", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "This npm module provides a set of nodes to interact with Keycloak, offering functionalities ranging from email verification to token validation and sending emails.\n", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
232589
690