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
|
|
|
},
|
2019-02-14 15:39:19 +00:00
|
|
|
{
|
|
|
|
type: 'jwt',
|
2019-03-14 19:26:09 +00:00
|
|
|
typeDisplay: 'JWT',
|
2019-02-14 15:39:19 +00:00
|
|
|
description: 'Authenticate using JWT or OIDC provider.',
|
|
|
|
tokenPath: 'client_token',
|
|
|
|
displayNamePath: 'display_name',
|
|
|
|
formAttributes: ['role', 'jwt'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'oidc',
|
|
|
|
typeDisplay: 'OIDC',
|
|
|
|
description: 'Authenticate using JWT or OIDC provider.',
|
|
|
|
tokenPath: 'client_token',
|
|
|
|
displayNamePath: 'display_name',
|
|
|
|
formAttributes: ['role', 'jwt'],
|
|
|
|
},
|
2019-03-28 21:40:22 +00:00
|
|
|
{
|
|
|
|
type: 'radius',
|
|
|
|
typeDisplay: 'RADIUS',
|
|
|
|
description: 'Authenticate with your RADIUS username and password.',
|
|
|
|
tokenPath: 'client_token',
|
|
|
|
displayNamePath: 'metadata.username',
|
|
|
|
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);
|