[orientdb]: get the current user when authenticating with tokens -
how can rid of current user (ouser) via binary api. using inbuilt token based authentication. expect 2 approaches:
a function currentuserrid() or something. looked in documentation found nothing.
decrypting token unlock userid/name. tried approach couldn't manage to. looked here: https://github.com/orientechnologies/orientdb/issues/2229 , https://groups.google.com/forum/#!topic/orient-database/6sufsad4lxo
i find post now, may late can this:
oserver server = oservermain.create(); // exemple odatabasedocumenttx db = new odatabasedocumenttx(bddurl).open("admin","admin"); // admin juste exemple otokenhandlerimpl handler = new otokenhandlerimpl(server); otoken tok = handler.parsewebtoken(yourtoken); ouser user = tok.getuser(db);
Comments
Post a Comment