summaryrefslogtreecommitdiffstats
path: root/webapp/components/authorize.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/authorize.jsx')
-rw-r--r--webapp/components/authorize.jsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/webapp/components/authorize.jsx b/webapp/components/authorize.jsx
index 684bae589..f3f5770de 100644
--- a/webapp/components/authorize.jsx
+++ b/webapp/components/authorize.jsx
@@ -1,7 +1,6 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import Client from 'client/web_client.jsx';
import FormError from 'components/form_error.jsx';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
@@ -9,6 +8,8 @@ import React from 'react';
import icon50 from 'images/icon50x50.png';
+import {getOAuthAppInfo, allowOAuth2} from 'actions/admin_actions.jsx';
+
export default class Authorize extends React.Component {
static get propTypes() {
return {
@@ -27,7 +28,7 @@ export default class Authorize extends React.Component {
}
componentWillMount() {
- Client.getOAuthAppInfo(
+ getOAuthAppInfo(
this.props.location.query.client_id,
(app) => {
this.setState({app});
@@ -46,7 +47,7 @@ export default class Authorize extends React.Component {
handleAllow() {
const params = this.props.location.query;
- Client.allowOAuth2(params.response_type, params.client_id, params.redirect_uri, params.state, params.scope,
+ allowOAuth2(params,
(data) => {
if (data.redirect) {
window.location.href = data.redirect;