mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-10 10:02:02 +05:30
22 lines
476 B
JavaScript
22 lines
476 B
JavaScript
|
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);
|
||
|
}
|
||
|
}
|