fidor_starter_kits 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c225915b009fa0fb2bc2e50eb38d390bc6a9a0b7
4
- data.tar.gz: 3547304f05e844378c9980252dd3ddf40717f4f2
3
+ metadata.gz: 385c43541dc48c1da99e20d60343799b235029da
4
+ data.tar.gz: 31041d4908acaa21af5276df0930cc4681e6ab07
5
5
  SHA512:
6
- metadata.gz: b6fa01c0bdf645fe69e7bfab33b2ee7ac2a7ede087f7ef71dbefef88efeb80fb674554b40cf10f80b4d9dc9b808434c5372e7059c6d8ca52cf603e19e1e0dbe7
7
- data.tar.gz: 21888227a82c338ad77845ae9c1d0cce1eb84a71202c0907eed5bcb8f351fbe5eefb6e00221144f87455c2030a87e4172bc2efd6623c0415956269bb5bb4c266
6
+ metadata.gz: 48ebf73bf2cfa9b42a595c75e214b73b851b6a04c931635f9517d834159f515c5f484ef6d6abdd036b34fa0dc3db5589746f9ee60630a3c0c7231ce860bdc825
7
+ data.tar.gz: 7b2f60e6dd06aace2defa0ed5de47fa1fbc782cf529cb35199616b4c42cbad1e43a67ae73eedec59956562290ab6d12ceb6e1776f81828abbffb36d601f90dae
@@ -1,3 +1,3 @@
1
1
  module FidorStarterKits
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -101,7 +101,7 @@ func retrieveTokenFromCode(code string) (token string, err error) {
101
101
  "client_secret": {client_secret},
102
102
  "code": {code},
103
103
  "redirect_uri": {url.QueryEscape(oauth_cb_url)},
104
- "grant_type": {"autorization_code"}
104
+ "grant_type": {"authorization_code"},
105
105
  }
106
106
  // Call API
107
107
  if resp, err := http.PostForm(tokenUrl, tokenPayload); err != nil {
@@ -3,5 +3,5 @@
3
3
  "description" : "A simple nodejs based app, showing how to get user transactions",
4
4
  "app_name":"node_tx",
5
5
  "app_url":"http://localhost:3141",
6
- "callback_urls":"http://localhost:3141/code"
6
+ "callback_urls":"http://localhost:3141"
7
7
  }
@@ -14,7 +14,6 @@
14
14
  // manager an need to be transfered into the config below:
15
15
 
16
16
  var fidor_config = {
17
- app_port : 3001,
18
17
  app_url : "<APP_URL>",
19
18
  client_id : "<CLIENT_ID>",
20
19
  client_secret : "<CLIENT_SECRET>",
@@ -22,6 +21,8 @@ var fidor_config = {
22
21
  }
23
22
 
24
23
 
24
+
25
+
25
26
  // redirect the user to the OAuth authorization endpoint with the
26
27
  // following params:
27
28
  // - client_id
@@ -39,7 +40,7 @@ function redirect_to_oauth(response){
39
40
  return
40
41
  }
41
42
 
42
- <// Execute a POST request against the OAUTH token endpoint
43
+ // Execute a POST request against the OAUTH token endpoint
43
44
  // in order to exchange: code, client_id, client_secret,
44
45
  // rerdirect_uri and grant_type for an auth_token.
45
46
  function retrieve_access_token_from_code( code, cb ) {
@@ -85,7 +86,7 @@ function retrieve_access_token_from_code( code, cb ) {
85
86
  token_request.end()
86
87
  }
87
88
 
88
- <
89
+
89
90
  // Display a friendly message and links to the API Endpoints.
90
91
  function renderWelcome(request, response, token) {
91
92
  response.writeHead(200, {"Content-Type" : "text/html"})
@@ -126,6 +127,9 @@ var url = require("url")
126
127
  var querystring = require("querystring")
127
128
  var http = require("http")
128
129
 
130
+ var _url = url.parse(fidor_config.app_url)
131
+ fidor_config.app_port = _url.port
132
+
129
133
  // start the server
130
134
  var server = http.createServer(listener)
131
135
  server.listen(fidor_config.app_port)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fidor_starter_kits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Leciejewski