Token service implementation for REST API