1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Make angular client load dynamically the generated client id/secret

This commit is contained in:
Chocobozzz 2016-04-27 22:11:48 +02:00
parent 2693922352
commit 23a5a916db
3 changed files with 46 additions and 0 deletions

View file

@ -35,6 +35,7 @@ const Users = {
getAccessToken: getAccessToken,
getClient: getClient,
getClients: getClients,
getFirstClient: getFirstClient,
getRefreshToken: getRefreshToken,
getUser: getUser,
getUsers: getUsers,
@ -64,6 +65,10 @@ function getAccessToken (bearerToken, callback) {
return OAuthTokensDB.findOne({ accessToken: bearerToken }).populate('user')
}
function getFirstClient (callback) {
return OAuthClientsDB.findOne({}, callback)
}
function getClient (clientId, clientSecret) {
logger.debug('Getting Client (clientId: ' + clientId + ', clientSecret: ' + clientSecret + ').')