open-vault/ui/app/helpers/supported-auth-backends.js
Matthew Irish 08c9bf3940
UI - Login fix (#4403)
* fix login

* add tests for login submission
2018-04-20 15:39:45 -05:00

46 lines
1.1 KiB
JavaScript

import Ember from 'ember';
const SUPPORTED_AUTH_BACKENDS = [
{
type: 'token',
description: 'Token authentication.',
tokenPath: 'id',
displayNamePath: 'display_name',
formAttributes: ['token'],
},
{
type: 'userpass',
description: 'A simple username and password backend.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
},
{
type: 'LDAP',
description: 'LDAP authentication.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
},
{
type: 'Okta',
description: 'Authenticate with your Okta username and password.',
tokenPath: 'client_token',
displayNamePath: 'metadata.username',
formAttributes: ['username', 'password'],
},
{
type: 'GitHub',
description: 'GitHub authentication.',
tokenPath: 'client_token',
displayNamePath: ['metadata.org', 'metadata.username'],
formAttributes: ['token'],
},
];
export function supportedAuthBackends() {
return SUPPORTED_AUTH_BACKENDS;
}
export default Ember.Helper.helper(supportedAuthBackends);