Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git] / server / serializers / rest / oauth-client-strategy.js
blobd0932b9c274570b690362efa92ce70225bd7b401
1 'use strict';
3 function OauthClientStrategy(options) {
4 this.options = options || {};
6 this.preload = function() {
7 var strategies = [];
9 return Promise.all(strategies);
12 this.map = function(oauthClient) {
13 var id = oauthClient.id || (oauthClient._id && oauthClient._id.toHexString());
15 return {
16 id,
17 name: oauthClient.name,
18 tag: oauthClient.tag,
19 clientKey: oauthClient.clientKey,
20 clientSecret: oauthClient.clientSecret,
21 registeredRedirectUri: oauthClient.registeredRedirectUri,
22 ownerUserId: oauthClient.ownerUserId,
23 revoked: oauthClient.revoked
28 OauthClientStrategy.prototype = {
29 name: 'OauthClientStrategy'
32 module.exports = OauthClientStrategy;