[security] use GenericTokenFactoryInterface in examples.