feat: 🎸 initial LDAP authentication support (#1645)
* feat: 🎸 initial LDAP authentication support
This commit is contained in:
1 parent
b344c5fc18
commit
4c80f8d8ff
14 files changed
+161
-35
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
import PasswordAuthenticator from './password';
|
||||
|
||||
/**
|
||||
* A simple login_name/password authenticator that authenticates with
|
||||
* a scope/auth-method endpoint. Authentication occurs on an auth method
|
||||
* endpoint, while deauthentication occurs on a scope endpoint.
|
||||
*/
|
||||
export default class LDAPAuthenticator extends PasswordAuthenticator {}
|
||||
@@ -0,0 +1,41 @@
|
||||
{{!
|
||||
Copyright (c) HashiCorp, Inc.
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
}}
|
||||
|
||||
<Rose::Form
|
||||
class='full-width'
|
||||
@onSubmit={{fn
|
||||
this.submit
|
||||
@onSubmit
|
||||
(hash identification=this.identification password=this.password)
|
||||
}}
|
||||
@disabled={{@disabled}}
|
||||
as |form|
|
||||
>
|
||||
<Hds::Form::TextInput::Field
|
||||
name='identification'
|
||||
@value={{this.identification}}
|
||||
@type='text'
|
||||
{{on 'input' (set-from-event this 'identification')}}
|
||||
as |F|
|
||||
>
|
||||
<F.Label>{{t 'form.login_name.label'}}</F.Label>
|
||||
</Hds::Form::TextInput::Field>
|
||||
|
||||
<Hds::Form::TextInput::Field
|
||||
name='password'
|
||||
@value={{this.password}}
|
||||
@type='password'
|
||||
{{on 'input' (set-from-event this 'password')}}
|
||||
as |F|
|
||||
>
|
||||
<F.Label>{{t 'form.password.label'}}</F.Label>
|
||||
</Hds::Form::TextInput::Field>
|
||||
|
||||
<form.actions
|
||||
@submitText={{t 'actions.authenticate'}}
|
||||
@showCancel={{false}}
|
||||
/>
|
||||
|
||||
</Rose::Form>
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
export default class FormAuthenticatePasswordComponent extends Component {
|
||||
export default class FormAuthenticateDetailsComponent extends Component {
|
||||
// =properties
|
||||
|
||||
/**
|
||||
@@ -9,7 +9,6 @@
|
||||
{{component
|
||||
(concat 'form/authenticate/' @model.type)
|
||||
submit=@submit
|
||||
cancel=false
|
||||
disabled=@disabled
|
||||
}}
|
||||
{{/if}}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{!
|
||||
Copyright (c) HashiCorp, Inc.
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
}}
|
||||
|
||||
<Form::Authenticate::Details @onSubmit={{@submit}} @disabled={{@disabled}} />
|
||||
@@ -6,7 +6,6 @@
|
||||
<Rose::Form
|
||||
class='full-width'
|
||||
@onSubmit={{@submit}}
|
||||
@cancel={{false}}
|
||||
@disabled={{@disabled}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
@@ -3,35 +3,4 @@
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
}}
|
||||
|
||||
<Rose::Form
|
||||
class='full-width'
|
||||
@onSubmit={{fn
|
||||
this.submit
|
||||
@submit
|
||||
(hash identification=this.identification password=this.password)
|
||||
}}
|
||||
@cancel={{false}}
|
||||
@disabled={{@disabled}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
<form.input
|
||||
@name='identification'
|
||||
@type='text'
|
||||
@value={{this.identification}}
|
||||
@label={{t 'form.login_name.label'}}
|
||||
/>
|
||||
|
||||
<form.input
|
||||
@name='password'
|
||||
@type='password'
|
||||
@value={{this.password}}
|
||||
@label={{t 'form.password.label'}}
|
||||
/>
|
||||
|
||||
<form.actions
|
||||
@submitText={{t 'actions.authenticate'}}
|
||||
@showCancel={{false}}
|
||||
/>
|
||||
|
||||
</Rose::Form>
|
||||
<Form::Authenticate::Details @onSubmit={{@submit}} @disabled={{@disabled}} />
|
||||
Reference in new issue
Block a user