fidor_starter_kits 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4965c8a528cc069cc760ae21236cfae18d44c2c
4
- data.tar.gz: 1d51a3c6a79360e5ad7052a7e55108a3ab293a5f
3
+ metadata.gz: 455dac3a1472751eff2af9a065ace07903a0a774
4
+ data.tar.gz: 8f704e362c9743db66a256a81cff4038d948e60b
5
5
  SHA512:
6
- metadata.gz: 36e6c3a9d859c0219d4b1997b4f01756c441049bfd65a0efce262d481920a7c464e3f20bc4b93ed5b5aa45f2282be7afd0250b954d89fbd69b77a988e092eb11
7
- data.tar.gz: 49667bf7536f7f85b99b41c510a0d8d6e76c71b2496ecae7b182eaa2b2f317e740f10647ccfb6918834540d3f22b693795e862e7604692b3f67b7f5b7ae8b76d
6
+ metadata.gz: 36551a95617bf621d341c7c12c99e04e4f82eca851f440867579aa600e97aea8a4a8ba9ce22af19e7b8c87b3cab4245493b23d5a6038de83cfc5c79815f73683
7
+ data.tar.gz: c6c1ed02a764094ee1c559aae45923dcf05a713696c412f7afa10fedb9c9258b30d54ee9100d55ac52c0703b9f5f50441c2a347ff90ba828b457b075516c0a79
@@ -1,3 +1,3 @@
1
1
  module FidorStarterKits
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -32,7 +32,7 @@ public class Example extends HttpServlet {
32
32
  private final String fidor_api_url = "<FIDOR_API_URL>";
33
33
  private HttpClient httpClient;
34
34
  private JSONParser parser;
35
-
35
+
36
36
  /**
37
37
  * @see HttpServlet#HttpServlet()
38
38
  */
@@ -56,7 +56,7 @@ public class Example extends HttpServlet {
56
56
  HttpResponse userResponse = httpClient.execute(RequestBuilder.get().setUri(getUserUri(token)).build());
57
57
  String body = EntityUtils.toString(userResponse.getEntity());
58
58
  JSONObject user = (JSONObject)parser.parse(body);
59
-
59
+
60
60
  response.setContentType("text/html");
61
61
  PrintWriter writer = response.getWriter();
62
62
  writer.append(
@@ -70,7 +70,7 @@ public class Example extends HttpServlet {
70
70
  } catch (ParseException e) {
71
71
  e.printStackTrace();
72
72
  }
73
-
73
+
74
74
  }
75
75
  }
76
76
 
@@ -85,9 +85,9 @@ public class Example extends HttpServlet {
85
85
  .addParameter("redirect_uri", app_url)
86
86
  .addParameter("code", code)
87
87
  .addParameter("client_secret", client_secret)
88
- .addParameter("grant_type", "authorization_token")
88
+ .addParameter("grant_type", "authorization_code")
89
89
  .build();
90
-
90
+
91
91
  HttpResponse resp = httpClient.execute(req);
92
92
  String body = EntityUtils.toString(resp.getEntity());
93
93
  Object jsonResponse = parser.parse(body);
@@ -100,15 +100,15 @@ public class Example extends HttpServlet {
100
100
  }
101
101
 
102
102
  private URI getTokenUri() throws URISyntaxException {
103
- return new URI(fidor_oauth_url + "/token");
103
+ return new URI(fidor_oauth_url + "/token");
104
104
  }
105
105
 
106
106
  private String getCodeUrl() {
107
- return fidor_oauth_url + "/authorize?client_id=" + client_id + "&redirect_uri=" + app_url +"&state=1234&response_type=authroization_code";
107
+ return fidor_oauth_url + "/authorize?client_id=" + client_id + "&redirect_uri=" + app_url +"&state=1234&response_type=code";
108
108
  }
109
-
109
+
110
110
  private String getAccountUrl(String token) {
111
111
  return fidor_api_url + "/accounts?access_token=" + token;
112
112
  }
113
-
113
+
114
114
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fidor_starter_kits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Leciejewski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-22 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip