open-nomad/ui/app/models/auth-method.js
Phil Renaud e9a114e249 [ui] Web sign-in with JWT (#16625)
* Bones of JWT detection

* JWT to token pipeline complete

* Some live-demo fixes for template language

* findSelf and loginJWT funcs made async

* Acceptance tests and mirage mocks for JWT login

* [ui] Allow for multiple JWT auth methods in the UI (#16665)

* Split selectable jwt methods

* repositions the dropdown to be next to the input field
2023-03-30 09:40:12 +02:00

24 lines
544 B
JavaScript

// @ts-check
import Model from '@ember-data/model';
import { attr } from '@ember-data/model';
export default class AuthMethodModel extends Model {
@attr('string') name;
/**
* @type {'JWT' | 'OIDC'}
*/
@attr('string') type;
@attr('string') tokenLocality;
@attr('string') maxTokenTTL;
@attr('boolean') default;
@attr('date') createTime;
@attr('number') createIndex;
@attr('date') modifyTime;
@attr('number') modifyIndex;
getAuthURL(params) {
return this.store.adapterFor('authMethod').getAuthURL(params);
}
}