This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-3484 OAuth2 Service Provider (#3632)
* PLT-3484 OAuth2 Service Provider * PM text review for OAuth 2.0 Service Provider * PLT-3484 OAuth2 Service Provider UI tweaks (#3668) * Tweaks to help text * Pushing OAuth improvements (#3680) * Re-arrange System Console for OAuth 2.0 Provider
- Loading branch information
Showing
33 changed files
with
1,173 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import Client from 'client/web_client.jsx'; | ||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; | ||
import Constants from 'utils/constants.jsx'; | ||
|
||
const ActionTypes = Constants.ActionTypes; | ||
|
||
export function listOAuthApps(userId, onSuccess, onError) { | ||
Client.listOAuthApps( | ||
(data) => { | ||
AppDispatcher.handleServerAction({ | ||
type: ActionTypes.RECEIVED_OAUTHAPPS, | ||
userId, | ||
oauthApps: data | ||
}); | ||
|
||
if (onSuccess) { | ||
onSuccess(data); | ||
} | ||
}, | ||
onError | ||
); | ||
} | ||
|
||
export function deleteOAuthApp(id, userId, onSuccess, onError) { | ||
Client.deleteOAuthApp( | ||
id, | ||
() => { | ||
AppDispatcher.handleServerAction({ | ||
type: ActionTypes.REMOVED_OAUTHAPP, | ||
userId, | ||
id | ||
}); | ||
|
||
if (onSuccess) { | ||
onSuccess(); | ||
} | ||
}, | ||
onError | ||
); | ||
} | ||
|
||
export function registerOAuthApp(app, onSuccess, onError) { | ||
Client.registerOAuthApp( | ||
app, | ||
(data) => { | ||
AppDispatcher.handleServerAction({ | ||
type: ActionTypes.RECEIVED_OAUTHAPP, | ||
oauthApp: data | ||
}); | ||
|
||
if (onSuccess) { | ||
onSuccess(); | ||
} | ||
}, | ||
onError | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.