[security] extend TokenFactory from GenericTokenFactory.