integration refactoring

I don't get your comment. Is you can see from the example, the token generation will be in the library, not in the application.