fidor_starter_kits 0.3.5 → 0.3.6
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 +4 -4
- data/lib/fidor_starter_kits.rb +1 -1
- data/lib/fidor_starter_kits/version.rb +1 -1
- data/spec/fidor_starter_kits_spec.rb +2 -2
- data/starter_kits/golang_transactions/.fidor_meta.json +8 -0
- data/starter_kits/{golang_plain → golang_transactions}/README.md +3 -3
- data/starter_kits/{golang_plain → golang_transactions}/example.go +3 -4
- data/starter_kits/java_servlet/.fidor_meta.json +2 -1
- data/starter_kits/node_tx/.fidor_meta.json +4 -3
- data/starter_kits/php_oauth_plain/.fidor_meta.json +3 -2
- data/starter_kits/ruby_oauth_plain/.fidor_meta.json +3 -2
- metadata +4 -4
- data/starter_kits/golang_plain/.fidor_meta.json +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf115559549bd2278bb32ad42914eb50198dac6e
|
4
|
+
data.tar.gz: 2d0ebdc5a1a78bf02e0b4c7a3d5eb7f86256af10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdea540d86cd11d32e183a43f0b571b3e112c61573634733cb76b520e438800a29636f824ef3503fd13bce90179ebb0c8a6dbbf458e847617d9e66ef8e24dbd8
|
7
|
+
data.tar.gz: c3241a3eb8581540143fd71a890c1e3a81356072ce2be870bdcb988f19e6024913034dbe5824bb73939e40d69475587abcd89dbfba175a4ad8676c33954a551a
|
data/lib/fidor_starter_kits.rb
CHANGED
@@ -56,8 +56,8 @@ describe FidorStarterKits do
|
|
56
56
|
|
57
57
|
it 'loads the json meta data' do
|
58
58
|
conf = FidorStarterKits.all
|
59
|
-
expect(conf["
|
60
|
-
expect(conf["node_tx"]["description"]).to eq("
|
59
|
+
expect(conf["golang_transactions"]["display_name"]).to eq("Go Transactions")
|
60
|
+
expect(conf["node_tx"]["description"]).to eq("NodeJS app getting transactions and accounts. Handling oAuth login.")
|
61
61
|
expect(conf["php_oauth_plain"]["app_name"]).to eq("php_oauth_plain")
|
62
62
|
expect(conf["ruby_oauth_plain"]["app_url"]).to eq("http://localhost:4567")
|
63
63
|
expect(conf["java_servlet"]["callback_urls"]).to eq("http://localhost:8080/JavaServlet/Example")
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{
|
2
|
+
"display_name" : "Go Transactions",
|
3
|
+
"description" : "Golang app getting transactions & accounts and handling oAuth based logins.",
|
4
|
+
"app_name":"golang_transactions",
|
5
|
+
"app_url":"http://localhost:8080",
|
6
|
+
"callback_urls":"http://localhost:8080",
|
7
|
+
"language" : "golang"
|
8
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# Golang GET Transactions
|
2
2
|
|
3
3
|
This is a basic example project that demonstrates the Fidor API OAuth
|
4
|
-
flow
|
5
|
-
|
4
|
+
flow, saving access-tokens to a session and grabbing transactions and account
|
5
|
+
details.
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
@@ -30,8 +30,8 @@ type Config struct {
|
|
30
30
|
AppUrl string // where to reach this application
|
31
31
|
ClientId string // OAuth Client_id parameter
|
32
32
|
ClientSecret string // OAuth Client_secret parameter
|
33
|
-
FidorApiUrl string // API endpoint
|
34
|
-
FidorOauthUrl string // OAuth endpoint
|
33
|
+
FidorApiUrl string // API endpoint e.g Sandbox: https://aps.fidor.de/oauth / Live: https://apm.fidor.de/oauth
|
34
|
+
FidorOauthUrl string // OAuth endpoint e.g Sandbox: https://aps.fidor.de / Live: https://api.fidor.de
|
35
35
|
}
|
36
36
|
|
37
37
|
var fidorConfig = Config{
|
@@ -87,7 +87,7 @@ const COOKIE_NAME = "GO_SESSION"
|
|
87
87
|
// session database, available access_tokens are mapped to their cookie-session keys
|
88
88
|
var sessions = make(map[string]string)
|
89
89
|
|
90
|
-
// stores a
|
90
|
+
// stores a retrieved access_token both on the server and the reference in a client-side cookie.
|
91
91
|
func createSession(w http.ResponseWriter, accessToken string) {
|
92
92
|
println(accessToken)
|
93
93
|
rnd := make([]byte, 20, 20)
|
@@ -180,7 +180,6 @@ func handleOAuthCallback(w http.ResponseWriter, r *http.Request) {
|
|
180
180
|
func handleLogout(w http.ResponseWriter, r *http.Request, endpoint string) {
|
181
181
|
if cookie, err := r.Cookie(COOKIE_NAME); err == nil {
|
182
182
|
// we have a cookie
|
183
|
-
|
184
183
|
// remove it from our stored sessions
|
185
184
|
session := cookie.Value
|
186
185
|
delete(sessions, session)
|
@@ -3,5 +3,6 @@
|
|
3
3
|
"description" : "A simple java servlet based app, showing how to get the access token",
|
4
4
|
"app_name":"java_servlet",
|
5
5
|
"app_url":"http://localhost:8080/JavaServlet/Example",
|
6
|
-
"callback_urls":"http://localhost:8080/JavaServlet/Example"
|
6
|
+
"callback_urls":"http://localhost:8080/JavaServlet/Example",
|
7
|
+
"language" : "java"
|
7
8
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
{
|
2
|
-
"display_name" : "
|
3
|
-
"description" : "
|
2
|
+
"display_name" : "NodeJS Transactions",
|
3
|
+
"description" : "NodeJS app getting transactions and accounts. Handling oAuth login.",
|
4
4
|
"app_name":"node_tx",
|
5
5
|
"app_url":"http://localhost:3141",
|
6
|
-
"callback_urls":"http://localhost:3141"
|
6
|
+
"callback_urls":"http://localhost:3141",
|
7
|
+
"language" : "nodejs"
|
7
8
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"display_name" : "PHP oAuth Plain",
|
3
|
-
"description" : "
|
3
|
+
"description" : "PHP script getting the access token",
|
4
4
|
"app_name":"php_oauth_plain",
|
5
5
|
"app_url":"http://localhost:8000/example.php",
|
6
|
-
"callback_urls":"http://localhost:8000/example.php"
|
6
|
+
"callback_urls":"http://localhost:8000/example.php",
|
7
|
+
"language" : "php"
|
7
8
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"display_name" : "Ruby oAuth Plain",
|
3
|
-
"description" : "
|
3
|
+
"description" : "Ruby app doing the oAuth login to get and use the access token. Uses Sinatra as server.",
|
4
4
|
"app_name":"ruby_oauth_plain",
|
5
5
|
"app_url":"http://localhost:4567",
|
6
|
-
"callback_urls":"http://localhost:4567"
|
6
|
+
"callback_urls":"http://localhost:4567",
|
7
|
+
"language" : "ruby"
|
7
8
|
}
|
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.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Leciejewski
|
@@ -85,9 +85,9 @@ files:
|
|
85
85
|
- lib/fidor_starter_kits/version.rb
|
86
86
|
- spec/fidor_starter_kits_spec.rb
|
87
87
|
- spec/spec_helper.rb
|
88
|
-
- starter_kits/
|
89
|
-
- starter_kits/
|
90
|
-
- starter_kits/
|
88
|
+
- starter_kits/golang_transactions/.fidor_meta.json
|
89
|
+
- starter_kits/golang_transactions/README.md
|
90
|
+
- starter_kits/golang_transactions/example.go
|
91
91
|
- starter_kits/java_servlet/.classpath
|
92
92
|
- starter_kits/java_servlet/.fidor_meta.json
|
93
93
|
- starter_kits/java_servlet/.project
|