8d9d8e3d0e
* default to token auth method * pass in selectedValue to the AuthForm * adjust when and if tasks are called so there's no race condition with wrapped_token query param * add some tests for wrapped_token * adjust redirect_to behavior so that it also works with the logout route and the wrapped_token query param * fix linting
30 lines
853 B
JavaScript
30 lines
853 B
JavaScript
import { computed } from '@ember/object';
|
|
import { inject as service } from '@ember/service';
|
|
import Route from '@ember/routing/route';
|
|
import ModelBoundaryRoute from 'vault/mixins/model-boundary-route';
|
|
|
|
export default Route.extend(ModelBoundaryRoute, {
|
|
auth: service(),
|
|
controlGroup: service(),
|
|
flashMessages: service(),
|
|
console: service(),
|
|
permissions: service(),
|
|
namespaceService: service('namespace'),
|
|
|
|
modelTypes: computed(function() {
|
|
return ['secret', 'secret-engine'];
|
|
}),
|
|
|
|
beforeModel() {
|
|
this.auth.deleteCurrentToken();
|
|
this.controlGroup.deleteTokens();
|
|
this.namespaceService.reset();
|
|
this.console.set('isOpen', false);
|
|
this.console.clearLog(true);
|
|
this.clearModelCache();
|
|
this.flashMessages.clearMessages();
|
|
this.permissions.reset();
|
|
this.replaceWith('vault.cluster.auth');
|
|
},
|
|
});
|