static TokenResponse PasswordFlow() { Console.WriteLine("Resource Owner Passord flow"); var client = new AdvIdentityClient { Issuer = "https://vmapxba9.advent.com:5001", ClientId = "ro.APXAPIClient", ClientSecret = "advs", Scope = "apxapi offline_access" }; var result = client.Login("pm", "advs"); return(result); }
static TokenResponse WindowsAuthFlow() { Console.WriteLine("Windows Authentiation flow"); var client = new AdvIdentityClient { Issuer = "https://vmapxba9.advent.com:5001", ClientId = "ro.APXAPIClient", ClientSecret = "advs", Scope = "apxapi offline_access" }; var result = client.Login(); return(result); }
static LoginResult AuthorizationCodeFlow() { Console.WriteLine("Authorization Code flow"); var client = new AdvIdentityClient { Issuer = "https://vmapxba9.advent.com:5001", ClientId = "authcode.apxui", ClientSecret = "advs", Scope = "openid apxapi offline_access" }; var result = client.Signin(); return(result); }