2019-02-14 15:39:19 +00:00
|
|
|
<form
|
|
|
|
id="auth-form"
|
|
|
|
onsubmit={{action (if this.isOIDC "startOIDCAuth" @onSubmit) (hash role=roleName jwt=jwt)}}
|
|
|
|
>
|
|
|
|
<div class="field">
|
|
|
|
<label for="role" class="is-label">Role</label>
|
|
|
|
<div class="control">
|
|
|
|
<input
|
|
|
|
value={{@roleName}}
|
|
|
|
placeholder="Default"
|
|
|
|
oninput={{perform this.fetchRole value="target.value"}}
|
|
|
|
autocomplete="off"
|
2019-05-16 14:54:11 +00:00
|
|
|
spellcheck="false"
|
2019-02-14 15:39:19 +00:00
|
|
|
name="role"
|
|
|
|
id="role"
|
|
|
|
class="input"
|
|
|
|
type="text"
|
|
|
|
data-test-role
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<AlertInline @type="info" @message="Leave blank to sign in with the default role if one is configured" />
|
|
|
|
</div>
|
|
|
|
{{#unless this.isOIDC}}
|
|
|
|
<div class="field">
|
|
|
|
<label for="token" class="is-label">JWT Token</label>
|
|
|
|
<div class="control">
|
|
|
|
{{input
|
|
|
|
type="password"
|
|
|
|
value=jwt
|
|
|
|
name="jwt"
|
|
|
|
class="input"
|
|
|
|
autocomplete="off"
|
2019-05-16 14:54:11 +00:00
|
|
|
spellcheck="false"
|
2019-02-14 15:39:19 +00:00
|
|
|
data-test-jwt=true
|
|
|
|
}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
<div data-test-yield-content>
|
|
|
|
{{yield}}
|
|
|
|
</div>
|
|
|
|
<button data-test-auth-submit=true type="submit" disabled={{@disabled}} class="button is-primary {{if @disabled 'is-loading'}}" id="auth-submit">
|
|
|
|
{{#if this.isOIDC}}
|
|
|
|
{{#if this.role.providerButtonComponent}}
|
|
|
|
{{component this.role.providerButtonComponent}}
|
|
|
|
{{else}}
|
|
|
|
Sign in with {{or this.role.providerName 'OIDC Provider'}}
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
Sign In
|
|
|
|
{{/if}}
|
|
|
|
</button>
|
|
|
|
</form>
|