Skip to content

Instantly share code, notes, and snippets.

@joaomoreno
Created March 4, 2014 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaomoreno/9347591 to your computer and use it in GitHub Desktop.
Save joaomoreno/9347591 to your computer and use it in GitHub Desktop.
public string CreateAuthorizationCode() {
var service = new ManagementService("SERVICE_NAMESPACE", "SERVICE_USERNAME", "SERVICE_USERKEY");
var delegation = service.CreateOAuth2Delegation("SERVICE_IDENTITY_NAME", "RELYING_PARTY_NAME", "USERNAME", "IDENTITY_PROVIDER");
return delegation.AuthorizationCode;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment