complete refactor of the decode_token method in oid BREAKING CHANGE: changes signatures significantly