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

17 lines
525 B
JavaScript
Raw Normal View History

2016-03-02 02:06:14 +05:30
import AbstractState from './AbstractState';
import CompleteState from './CompleteState';
export default class OAuthState extends AbstractState {
enter(context) {
const {query} = context.getRequest();
2016-03-02 02:06:14 +05:30
return context.run('oAuthValidate', {
2016-03-02 02:06:14 +05:30
clientId: query.client_id,
redirectUrl: query.redirect_uri,
responseType: query.response_type,
scope: query.scope,
state: query.state
}).then(() => context.setState(new CompleteState()));
}
}