I can create a login page using windows forms, but I need to be able to query our AD (active directory) for authentication.
I notice that on your Admin Web CLient, when adding a new user, you assign a Full NAme, Login id and email and there is an option to either use AD or not. We use it which makes everything so much easier.
How do I do that with my windows form program. The GUI I created (with A LOT of your help) works wonderfully, but currently we use a "master" user that has access to everything. Now that we have it working , we want to lock down the access. Can you point me to the correct Class and provide an example of how it should be implemented?
As always, Beth, you are the best!
Eric
Vault Login C# with Active Directory
Moderator: SourceGear
-
- Posts: 61
- Joined: Thu Nov 13, 2014 10:12 am
- Location: Lake in the Hills, IL
Vault Login C# with Active Directory
Thanks!
Eric
Eric
Re: Vault Login C# with Active Directory
When a user in Vault is using AD authentication, the actual login is passed over to the domain, and it should send back a true or false.
You shouldn't have to write the actual piece that says whether to use AD or not. Create your user in Vault and use the exact AD login name. You don't need to put in the AD password.
You should also be able to look at a basic login with the CLC code that is included in the Vault API download.
You shouldn't have to write the actual piece that says whether to use AD or not. Create your user in Vault and use the exact AD login name. You don't need to put in the AD password.
You should also be able to look at a basic login with the CLC code that is included in the Vault API download.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
-
- Posts: 61
- Joined: Thu Nov 13, 2014 10:12 am
- Location: Lake in the Hills, IL
Re: Vault Login C# with Active Directory
Beth - I don't want to use CLC - I am using C# and use a login method. I use the following constants:
c_url: our vault server
c_username: vlt
c_password: vltpassword
public static void Login() {
ServerOperations.client.LoginOptions.URL = c_url;
ServerOperations.client.LoginOptions.User = c_username;
ServerOperations.client.LoginOptions.Password = c_password;
ServerOperations.Login();
}
So now I want to use AD to validate login status. Your response makes it sound like I can simply pass the username without a password. However, that doesn't work. What setting do I need to use to make Vault work with only sending the username?
c_url: our vault server
c_username: vlt
c_password: vltpassword
public static void Login() {
ServerOperations.client.LoginOptions.URL = c_url;
ServerOperations.client.LoginOptions.User = c_username;
ServerOperations.client.LoginOptions.Password = c_password;
ServerOperations.Login();
}
So now I want to use AD to validate login status. Your response makes it sound like I can simply pass the username without a password. However, that doesn't work. What setting do I need to use to make Vault work with only sending the username?
Thanks!
Eric
Eric
Re: Vault Login C# with Active Directory
I mentioned the CLC because you can see how we wrote a login for it. The code that was used for writing it is included in the API download.
The decision to use AD or to not use it is on the Server side, not the client side. You wouldn't decide that in your code.
In the server, you make a user and set up that user to use AD authentication. This doesn't happen in client code.
The decision to use AD or to not use it is on the Server side, not the client side. You wouldn't decide that in your code.
In the server, you make a user and set up that user to use AD authentication. This doesn't happen in client code.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Vault Login C# with Active Directory
When looking for the login in the CLC code, search for ServerOperations.Login();.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support