private static string GetIdentityToken() { "Requesting token".ConsoleYellow(); var client = new OAuth2Client(_oauth2Address); var response = client.RequestAccessTokenUserName("bob", "abc!123", Constants.Realm); return response.AccessToken; }
private static string GetServiceTokenOAuth2(string samlToken) { "Requesting service token".ConsoleYellow(); var client = new OAuth2Client(_acsOAuth2Endpoint); return client.RequestAccessTokenAssertion( samlToken, Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml2TokenProfile11, Constants.Realm).AccessToken; }