open-vault/ui/app/helpers/supported-auth-backends.js
Matthew Irish d509588cd2
Ember update (#5386)
Ember update - update ember-cli, ember-data, and ember to 3.4 series
2018-09-25 11:28:26 -05:00

51 lines
1.3 KiB
JavaScript

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