You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've used orientdb sometimes for personal projects, and now I'd like to use it in a webapp. I want to support the following use case:
The user selects a db from a list of existing databases
The user is asked to enter username/password
If the credentials are valid, a token is generated and stored in the user profile
From now on, db connection for that use happens through the token
In the OrientDB manual I read that it is possible to use a token for connecting to a db without having to enter the credentials each time, however I haven't been able to find a description of how does it actually work.
So can somebody confirm if orientdb supports the use case described above?
Assuming that the answer to the previous question is affermative, I found in the source code of the orientdb unit tests this approach to get a token:
ODatabaseSession db = orientDB.open(...);
OServer server = OServerMain.server();
OTokenHandlerImpl handler = new OTokenHandlerImpl( server );
byte[] tok = handler.getSignedWebToken( db, db.getUser() );
db.close();
But now, how do I use the token to reopen the database? OrientDB.open doesn't seem to take a token as parameter, so how am I supposed to proceed?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've used orientdb sometimes for personal projects, and now I'd like to use it in a webapp. I want to support the following use case:
In the OrientDB manual I read that it is possible to use a token for connecting to a db without having to enter the credentials each time, however I haven't been able to find a description of how does it actually work.
So can somebody confirm if orientdb supports the use case described above?
Assuming that the answer to the previous question is affermative, I found in the source code of the orientdb unit tests this approach to get a token:
ODatabaseSession db = orientDB.open(...);
OServer server = OServerMain.server();
OTokenHandlerImpl handler = new OTokenHandlerImpl( server );
byte[] tok = handler.getSignedWebToken( db, db.getUser() );
db.close();
But now, how do I use the token to reopen the database? OrientDB.open doesn't seem to take a token as parameter, so how am I supposed to proceed?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions