2018-09-25 16:28:26 +00:00
|
|
|
import { helper as buildHelper } from '@ember/component/helper';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
|
|
|
const SUPPORTED_AUTH_BACKENDS = [
|
|
|
|
{
|
|
|
|
type: 'token',
|
2018-08-16 13:16:24 +00:00
|
|
|
typeDisplay: 'Token',
|
2018-04-03 14:16:57 +00:00
|
|
|
description: 'Token authentication.',
|
|
|
|
tokenPath: 'id',
|
|
|
|
displayNamePath: 'display_name',
|
2018-04-20 20:39:45 +00:00
|
|
|
formAttributes: ['token'],
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'userpass',
|
2018-08-16 13:16:24 +00:00
|
|
|
typeDisplay: 'Username',
|
2018-04-03 14:16:57 +00:00
|
|
|
description: 'A simple username and password backend.',
|
|
|
|
tokenPath: 'client_token',
|
|
|
|
displayNamePath: 'metadata.username',
|
2018-04-20 20:39:45 +00:00
|
|
|
formAttributes: ['username', 'password'],
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
{
|
2018-08-16 13:16:24 +00:00
|
|
|
type: 'ldap',
|
|
|
|
typeDisplay: 'LDAP',
|
2018-04-03 14:16:57 +00:00
|
|
|
description: 'LDAP authentication.',
|
|
|
|
tokenPath: 'client_token',
|
|
|
|
displayNamePath: 'metadata.username',
|
2018-04-20 20:39:45 +00:00
|
|
|
formAttributes: ['username', 'password'],
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
{
|
2018-08-16 13:16:24 +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',
|
2018-04-20 20:39:45 +00:00
|
|
|
formAttributes: ['username', 'password'],
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
{
|
2018-08-16 13:16:24 +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'],
|
2018-04-20 20:39:45 +00:00
|
|
|
formAttributes: ['token'],
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export function supportedAuthBackends() {
|
|
|
|
return SUPPORTED_AUTH_BACKENDS;
|
|
|
|
}
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default buildHelper(supportedAuthBackends);
|