diff --git a/package.json b/package.json index b88eb9fe0..d74315260 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,11 @@ "is-utf8":"0.2.0", "serialport":"1.4.10", "feedparser":"0.19.2", - "fs.notify":"0.0.4" + "fs.notify":"0.0.4", + "passport":"0.2.1", + "passport-http-bearer":"1.0.1", + "passport-oauth2-client-password":"0.1.2", + "oauth2orize":"1.0.1" }, "devDependencies": { "grunt": "0.4.5", diff --git a/red/api/auth/clients.js b/red/api/auth/clients.js new file mode 100644 index 000000000..fdb5432eb --- /dev/null +++ b/red/api/auth/clients.js @@ -0,0 +1,32 @@ +/** + * Copyright 2014 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ + +var when = require("when"); + +var clients = [ + {id:"node-red-admin",secret:"not_available"} +]; + +module.exports = { + get: function(id) { + for (var i=0;i