예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }