strongloop-archive / strong-gateway-demo Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED | Our new gateway product is available at https://github.com/strongloop/microgateway.
License: Other
DEPRECATED | Our new gateway product is available at https://github.com/strongloop/microgateway.
License: Other
Hi
I have carefully study this schema :
There is a point I don't understand : which server take care of the user ?
As I have understand it's the authorization server (here localhost:3005). But on my resource server (here 3002) I need to know who is my user: for exemple give the note that belong to me, or give me the note that belong to my role.
Should I share a model between the different server? Especially in our case, we will inherit from the User Model
It's not very clear in my mind how the user exist in the different entity of the architecture...
Either running ./start-demo
or manually following the steps yields following error when accessing http://localhost:2001/
:
ECONNREFUSED
Error: connect ECONNREFUSED
http://localhost:2001/explorer/
works but only showing User
model, not the Note model I am expecting.
Auto-updating database: {"name":"db","connector":"mysql","host":"localhost","port":3306,"database":"strong-gateway-demo","username":"root","password":"","createDatabase":true,"debug":false,"collation":"utf8_general_ci","charset":"utf8","supportBigNumbers":false,"timezone":"local","connectionLimit":10}
## StrongLoop API Gateway is licensed from 2015-06-22T07:00:00.000Z to 2016-06-22T07:00:00.000Z.
## StrongLoop API Gateway is licensed from 2015-06-22T07:00:00.000Z to 2016-06-22T07:00:00.000Z.
Error in setting database: {"code":"ER_TOO_LONG_KEY","errno":1071,"sqlState":"42000","index":0}
@raymondfeng I remember you making changes to gateway to fix this error before. Did you push those changes? I'm using MySQL 5.6.25 FYI.
Hi there,
Can you please help me that where are the authUrl routes handling in oauth-playground folder in below link:
When i click ok in the confirmation dialog box no page is display.
Thanks
In Part 2 Step 2, running node auth-server
gives me following error despite I can see my non-expired api gateway license when running slc arc --licenses
and login:
## StrongLoop API Gateway licensing missing or invalid. Please verify your licen
ses in the Licenses page by running StrongLoop Arc by typing "slc arc --licenses
" . If you have questions about your license or StrongLoop licensing please cont
act [email protected].
## Terminating process.
What is missing?
This is Part =-2/2 of the Demo Notes app, I'm getting this error
root@strongloop:~/notes-app-gateway# node auth-server
(node) crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
Client application registered: id=123 name=demo-app key=secret
Client application registered: id=456 name=demo-app-2 key=secret
Client application registered: id=789 name=demo-app-3 key=secret
Client application registered: id=500 name=demo-app-4 key=secret
Client application registered: id=600 name=demo-app-5 key=secret
User registered: id=1 username=bob password=secret
Web server listening at http://0.0.0.0:3001
Web server listening at https://0.0.0.0:3101
Browse your REST API at https://localhost:3101/explorer
Step 7 has issues setting up database tables. The regular setup-db.js
script automigrates most tables properly except oauthclientapplication
form the loopback-component-oauth2
:
15-09-04T23:55:48.688Z pid:14653 worker:3 .../strong-gateway-demo/notes-app-gateway/auth-server/node_modules/loopback-connector-mysql/node_modules/mysql/lib/protocol/Parser.js:82
2015-09-04T23:55:48.688Z pid:14653 worker:3 throw err;
2015-09-04T23:55:48.689Z pid:14653 worker:3 ^
2015-09-04T23:55:48.689Z pid:14653 worker:3 Error: ER_NO_SUCH_TABLE: Table 'strong-gateway-demo.oauthclientapplication' doesn't exist
The README instructions and the example apps need to be updated.
Hi~ all , this is my code in server.js ,NODE_ENV=dev
run it's ok,but NODE_ENV=pro
Warning: connect.session() MemoryStore is not designed
app.middleware('session:before', app.loopback.cookieParser("abc"));
var store =new redisstore({
host: "127.0.0.1",
port: "6379",
pass: "secret",
ttl: "3600"
});
if (require.main === module) {
store.client.unref();
}
app.middleware('session', loopback.session({
saveUninitialized: true,
resave: true,
key: "secret",
store:store ,
"secret": "secret"
}));
Hi~
I get error when run the post data to gateway, the problem is that proxy work excellent in case of get requests but in case of post requests it results in socket hang up exception ,no post body is ok!
{ [Error: socket hang up] code: 'ECONNRESET' }
Error: request aborted
at IncomingMessage.onAborted (/Users/flat_peach/Downloads/strong-gateway-demo-master/oauth-playground/node_modules/raw-body/index.js:269:10)
at emitNone (events.js:67:13)
at IncomingMessage.emit (events.js:166:7)
at abortIncoming (_http_server.js:280:11)
at Socket.serverSocketCloseListener (_http_server.js:293:5)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at TCP._onclose (net.js:469:12)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.