accounts-frontend/src/services/authFlow/PermissionsState.js

22 lines
476 B
JavaScript
Raw Normal View History

2016-03-02 02:06:14 +05:30
import AbstractState from './AbstractState';
export default class PermissionsState extends AbstractState {
enter(context) {
context.navigate('/oauth/permissions');
}
resolve(context) {
this.process(context, true);
}
reject(context) {
this.process(context, false);
}
process(context, accept) {
context.run('oAuthComplete', {
accept
}).then((resp) => location.href = resp.redirectUri);
}
}