@cgignite/ignite-auth
Version:
Auth node allows you to integrate security withing your Ignite APIs and apps
91 lines • 4.1 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('oauth2-client-config', {
category: 'config',
color: '#3d7e9a',
defaults: {
name: { value: "" },
clientId: { value: "" },
redirectUrl: { value: "" },
authUrl: { value: "" },
accessTokenUrl: { value: "" },
scope: { value: "" },
state: { value: "" },
username: { value: "" },
},
credentials: {
password: { value: "" },
clientSecret: { value: "" },
},
inputs: 1,
outputs: 1,
icon: 'font-awesome/fa-unlock-alt',
label: function () {
return this.name || this.type;
}
});
</script>
<script type="text/html" data-template-name="oauth2-client-config">
<div class="form-row">
<label for="node-config-input-name">Name</label>
<input type="text" id="node-config-input-name" placeholder="name">
</div>
<!-- <div class="form-row">
<label for="node-config-input-grantType">Grant Type</label>
<input type="text" id="node-config-input-grantType" placeholder="grantType">
</div> -->
<div class="form-row">
<label for="node-config-input-clientId">Client Id</label>
<input type="text" id="node-config-input-clientId" placeholder="clientId">
</div>
<div class="form-row">
<label for="node-config-input-clientSecret">Client Secret</label>
<input type="password" id="node-config-input-clientSecret" placeholder="clientSecret">
</div>
<div class="form-row">
<label for="node-config-input-redirectUrl">Redirect Url</label>
<input type="text" id="node-config-input-redirectUrl" placeholder="redirectUrl">
</div>
<div class="form-row">
<label for="node-config-input-authUrl">Auth Url</label>
<input type="text" id="node-config-input-authUrl" placeholder="authUrl">
</div>
<div class="form-row">
<label for="node-config-input-accessTokenUrl">Access Token Url</label>
<input type="text" id="node-config-input-accessTokenUrl" placeholder="accessTokenUrl">
</div>
<div class="form-row">
<label for="node-config-input-scope">Scope</label>
<input type="text" id="node-config-input-scope" placeholder="scope">
</div>
<div class="form-row" style="display:none">
<label for="node-config-input-state">State</label>
<input type="text" id="node-config-input-state" placeholder="state">
</div>
<div class="form-row">
<label for="node-config-input-username">Username</label>
<input type="text" id="node-config-input-username" placeholder="username">
</div>
<div class="form-row">
<label for="node-config-input-password">Password</label>
<input type="password" id="node-config-input-password" placeholder="password">
</div>
</script>
<script type="text/html" data-help-name="oauth2-client-config">
<p><b>Client Id</b></p>
<p>If the client is authenticating via HTTP Basic Auth or some other method, then this parameter is not required. Otherwise, this parameter is required.</p>
<p><b>Client Secret</b></p>
<p>If the client was issued a client secret, then the server must authenticate the client.</p>
<p><b>Redirect Url</b></p>
<p>If the redirect URI was included in the initial authorization request, the service must require it in the token request as well. The redirect URI in the token request must be an exact match of the redirect URI that was used when generating the authorization code. The service must reject the request otherwise.
</p>
<p><b>Auth Url</b></p>
<p>Authorization Server Url</p>
<p><b>Access Token Url</b></p>
<p>Token Server Url</p>
<p><b>Scope</b></p>
<p>The scope requested by the application</p>
<p><b>Username</b></p>
<p>The user’s username, required for grant type <b>password</b> only</p>
<p><b>Password</b></p>
<p>The user’s password, required for grant type <b>password</b> only</p>
</script>