2021-12-17 03:44:29 +00:00
|
|
|
<form id="auth-form" onsubmit={{action (if this.isOIDC "startOIDCAuth" @onSubmit) (hash role=this.roleName jwt=this.jwt)}}>
|
2019-02-14 15:39:19 +00:00
|
|
|
<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>
|
2021-05-06 18:29:39 +00:00
|
|
|
<AlertInline
|
2021-12-17 03:44:29 +00:00
|
|
|
@sizeSmall={{true}}
|
|
|
|
@paddingTop={{true}}
|
|
|
|
@type="info"
|
2021-05-06 18:29:39 +00:00
|
|
|
@message="Leave blank to sign in with the default role if one is configured"
|
|
|
|
/>
|
2019-02-14 15:39:19 +00:00
|
|
|
</div>
|
|
|
|
{{#unless this.isOIDC}}
|
|
|
|
<div class="field">
|
|
|
|
<label for="token" class="is-label">JWT Token</label>
|
|
|
|
<div class="control">
|
2021-12-17 03:44:29 +00:00
|
|
|
<Input
|
|
|
|
@type="password"
|
|
|
|
@value={{this.jwt}}
|
|
|
|
name="jwt"
|
|
|
|
class="input"
|
|
|
|
autocomplete="off"
|
|
|
|
spellcheck="false"
|
|
|
|
data-test-jwt={{true}}
|
|
|
|
/>
|
2019-02-14 15:39:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
<div data-test-yield-content>
|
|
|
|
{{yield}}
|
|
|
|
</div>
|
2021-12-17 03:44:29 +00:00
|
|
|
<button
|
|
|
|
data-test-auth-submit={{true}}
|
|
|
|
type="submit"
|
|
|
|
disabled={{@disabled}}
|
|
|
|
class="button is-primary {{if @disabled "is-loading"}}"
|
|
|
|
id="auth-submit"
|
|
|
|
>
|
2019-02-14 15:39:19 +00:00
|
|
|
{{#if this.isOIDC}}
|
|
|
|
{{#if this.role.providerButtonComponent}}
|
|
|
|
{{component this.role.providerButtonComponent}}
|
|
|
|
{{else}}
|
2021-12-17 03:44:29 +00:00
|
|
|
Sign in with
|
|
|
|
{{or this.role.providerName "OIDC Provider"}}
|
2019-02-14 15:39:19 +00:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
Sign In
|
|
|
|
{{/if}}
|
|
|
|
</button>
|
2021-12-17 03:44:29 +00:00
|
|
|
</form>
|