Developer forum

Forum » Development » Auto Login

Reply
I have seen from Soeren has made a script for user IP addresses (see below), is it possible to implement/to make this without a IP check or with the IP address where the link was sent. Problem the user us different IP addresses but the same login.

http://engage.dynamicweb-cms.com/Show-Article-361.aspx?PID=2472&ArticleID=157

Replies

 
Reply
 
You have some dw users, each representing a company? A company should be able to log in with multiple IPs from the same network (e.g. 99.99.99.0-99.99.99.255)?

Here is what you could do...

A) Partial match
Store only the first three parts of the IP and match on that (e.g. 99.99.99).

B) LIKE match
Store all IP addresses in a long text field (textarea).
Change the SQL... WHERE AccessUser_IP LIKE ('%' + @IP + '%')

C) Range match
Store the start and end of the IP range in two user fields.
Change the SQL... WHERE @IP BETWEEN AccessUser_StartIP AND AccessUser_EndIP
(pseudo sql - will not work)
 
If that is not what you need, maybe you could elaborate on what you are trying to achieve?
 
BR.
Morten
 
Reply
Thanks for the response!

I just need a simple login script. Really just a file which will login a Extranet user in. The sales guys also use customers computers to login so IP address will not work. I have tried creating a script but I have no experience in this. I have tried looking for documentation but find nothing in the engage about "Dynamicweb.Security".

{  Dynamicweb.Security sec = new Dynamicweb.Security(); 
     sec.ExtranetLogin("USERXXX", "PASSXXX"); 

Response.Redirect("/default.aspx");
}

I just did not want to place the password and user in the url!

Would really appreciate a quick response need to implement fast
 
Reply
 if the user going to log in using his username and password, you really dont have to do anything.

Use the standard fields, make sure you set the action of the form to the page you want the user to be redirected to after log in, and that the method is post

Then DW handles the login,

/Kenneth
 
Reply
Thanks, problem is they will not have a login. The will login to a intranet system in this system is a LInk.

I need a URL that will log them in automatically. It is not clean having the user name and password in the URL so thought this would be possible with a simple login aspx file.
 
Reply
I'm not shure I understand what you need...

You have two sites?
Site A (intranet - inside network)
Site B (internet - outside network)

You need users to get logged in automatically on site B, when they click on a link on site A that points to site B...  without using username/password?
 
Reply
Thanks for answering!

You are correct, only thing is both websites are - outside network

You have two sites?
Site A (intranet - outside network)
Site B (internet - outside network)

We need users to get logged in automatically on site B, when they click on a link on site A that points to site B...  without having to login in again?

Due to important information it should not have the password/Username in the URL

Thanks in advance

Andy


 
Reply
 Hi,

if you just dont want the username and the password in the url, and you dont mind them being send over then network in clear text.
Then you can try and make a POST instead of a GET.

the simple way is to have a form on the page where you want to open the other page from.
the method of the form is "POST", Action is set to the url of your target Site/page.
Target of the form can be set to "_Blank" if you want a new page.
add input fields for username and password.
and submit the form.

/kenneth
 
Reply
Hi Kenneth,

Thanks for the response! I can not add a form unfortunately as it is not dynamicweb and a closed system, we can just add a URL. Wanted a file on the server that automatically logs someone in, instead of logoff.aspx, a autologin.aspx file. The file would be hidden and then the username and password would not be sent anywhere as it is in the .aspx file.

Andy

 

You must be logged in to post in the forum