open-vault/ui/app/helpers/supported-auth-backends.js

51 lines
1.3 KiB
JavaScript
Raw Normal View History

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