[OSJC-123] token authorization: minor cleanups, added integration test