Hello,
Sorry for the delay on this, Q2 is the IDP by definition alone. In the extension code and your service is defining the relationship and how to login to your external service through the Q2 login. So the answer to your questions is dependent on how you write your code and generate these values.
-Trey