Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Auth0Token.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ var Auth0Token = function() {
'iat': now
};

if(JSON.stringify(this.appMetadata) !== '{}') {
bodyInput.app_metadata = this.appMetadata;
}
return 'Bearer ' + jsrassign.jws.JWS.sign(null, headerInput, bodyInput, {b64: jsrassign.b64utob64(this.clientSecret)});
}
}
Expand All @@ -33,11 +36,12 @@ Auth0Token.title = "Auth0 Authorization Token";
Auth0Token.help = "https://github.com/LordZardeck/PAW-Auth0TokenDynamicValue";

Auth0Token.inputs = [
DynamicValueInput("issuer", "Issuer", "String"),
DynamicValueInput("userId", "User Id", "String"),
DynamicValueInput("email", "User Email", "String"),
DynamicValueInput("clientId", "Client ID", "String"),
DynamicValueInput("clientSecret", "Client Secret", "SecureValue")
InputField("issuer", "Issuer", "String"),
InputField("userId", "User Id", "String"),
InputField("email", "User Email", "String"),
InputField("clientId", "Client ID", "String"),
InputField("clientSecret", "Client Secret", "SecureValue"),
InputField("appMetadata", "App Metadata", "JSON", {defaultValue: '{}'})
]

registerDynamicValueClass(Auth0Token);