Add optional generateToken method to model

Allows you to override the default token generation mechanism