1<div class="auth-form"> 2 {{#if showLoading}} 3 <div class="vault-loader"> 4 <VaultLogoSpinner /> 5 </div> 6 {{/if}} 7 {{#if hasMethodsWithPath}} 8 <nav class="tabs is-marginless"> 9 <ul> 10 {{#each methodsToShow as |method|}} 11 {{#with (or method.path method.type) as |methodKey|}} 12 <li class="{{if (and selectedAuthIsPath (eq (or selectedAuthBackend.path selectedAuthBackend.type) methodKey)) 'is-active' ''}}" data-test-auth-method> 13 {{#link-to 'vault.cluster.auth' cluster.name (query-params with=methodKey) data-test-auth-method-link=method.type}} 14 {{or method.id (capitalize method.type)}} 15 {{/link-to}} 16 </li> 17 {{/with}} 18 {{/each}} 19 {{#if hasMethodsWithPath}} 20 <li class="{{if (not selectedAuthIsPath) 'is-active' ''}}" data-test-auth-method> 21 {{#link-to 'vault.cluster.auth' cluster.name (query-params with='token') data-test-auth-method-link="other"}} 22 Other 23 {{/link-to}} 24 </li> 25 {{/if}} 26 </ul> 27 </nav> 28 {{/if}} 29 <div class="box is-marginless is-shadowless"> 30 <MessageError 31 @errorMessage={{if (and cluster.standby hasCSPError) cspErrorText error}} 32 data-test-auth-error 33 /> 34 {{#if (or (not hasMethodsWithPath) (not selectedAuthIsPath))}} 35 <Select 36 @label='Method' 37 @name='auth-method' 38 @options={{supported-auth-backends}} 39 @valueAttribute={{'type'}} 40 @labelAttribute={{'typeDisplay'}} 41 @isFullwidth={{true}} 42 @selectedValue={{this.selectedAuth}} 43 @onChange={{action (mut this.selectedAuth)}} 44 /> 45 {{/if}} 46 {{#if (or (eq this.selectedAuthBackend.type "jwt") (eq this.selectedAuthBackend.type "oidc"))}} 47 <AuthJwt 48 @onError={{action "handleError"}} 49 @onLoading={{action (mut this.isLoading)}} 50 @onToken={{action (mut this.token)}} 51 @namespace={{this.namespace}} 52 @onNamespace={{action (mut this.namespace)}} 53 @onSelectedAuth={{action (mut this.selectedAuth)}} 54 @onSubmit={{action "doSubmit"}} 55 @onRoleName={{action (mut this.roleName)}} 56 @roleName={{this.roleName}} 57 @selectedAuthType={{this.selectedAuthBackend.type}} 58 @selectedAuthPath={{or this.customPath this.selectedAuthBackend.id}} 59 @disabled={{authenticate.isRunning}} 60 > 61 <AuthFormOptions 62 @customPath={{this.customPath}} 63 @onPathChange={{action (mut this.customPath)}} 64 @selectedAuthIsPath={{this.selectedAuthIsPath}} 65 /> 66 </AuthJwt> 67 {{else}} 68 <form 69 id="auth-form" 70 onsubmit={{action "doSubmit"}} 71 > 72 {{partial providerPartialName}} 73 {{#if (not-eq selectedAuthBackend.type "token")}} 74 <AuthFormOptions 75 @customPath={{this.customPath}} 76 @onPathChange={{action (mut this.customPath)}} 77 @selectedAuthIsPath={{this.selectedAuthIsPath}} 78 /> 79 {{/if}} 80 <button data-test-auth-submit=true type="submit" disabled={{authenticate.isRunning}} class="button is-primary {{if authenticate.isRunning 'is-loading'}}" id="auth-submit"> 81 Sign In 82 </button> 83 </form> 84 {{/if}} 85</div> 86</div> 87