Exemple #1
0
        public static void Main(string[] args)
        {
            try
            {
                var app = new IdentityClientApplication();
                app.Command("client-creds", "Test client credential flow", new ClientCredentialsCommand(app));
                app.Command("resource-owner", "Test resource owner (username + password) flow", new ResourceOwnerPasswordCommand(app));
                app.Command("facebook-token", "Test facebook user access token flow (IdentityModel.Client implementation)", new FacebookUserTokenCommand(app));
                app.Command("facebook-token-raw", "Test facebook user access token flow (raw HttpClient implementation)", new FacebookUserTokenCommand(app));
                app.Command("guest", "Test guest flow (IdentityModel.Client implementation)", new GuestAuthCommand(app));
                app.Command("guest-raw", "Test guest flow (raw HttpClient implementation)", new GuestAuthRawCommand(app));
                app.Command("guest-to-facebook", "Test guest flow to Facebook promotion", new GuestAuthToFacebookCommand(app));
                app.Command("guest-to-resource-owner", "Test guest flow to resource owner promotion", new GuestAuthToResourceOwnerPasswordCommand(app));

                app.StandardHelpOption();
                app.ShowHelpOnExecute();
                app.Execute(args);
            }
            catch (CommandParsingException cpe)
            {
                Console.WriteLine($"Error parsing: {cpe.Message}");
            }
        }
 public CommandBase(IdentityClientApplication application)
 {
     Application = application;
 }
Exemple #3
0
 public GuestAuthToResourceOwnerPasswordCommand(IdentityClientApplication application)
     : base(application)
 {
 }
Exemple #4
0
 public GuestAuthRawCommand(IdentityClientApplication application)
     : base(application)
 {
 }
 public FacebookUserTokenRawCommand(IdentityClientApplication application)
     : base(application)
 {
 }
Exemple #6
0
 public ClientCredentialsCommand(IdentityClientApplication application)
     : base(application)
 {
 }
Exemple #7
0
 public GuestAuthToFacebookCommand(IdentityClientApplication application)
     : base(application)
 {
 }