This topic is locked

Login Authorization

10/25/2006 16:18:54
ASPRunnerPro General questions
skemp author

Hi.
Is there any way to force asprunner login authentication to use credentials set by another application. I would like for the user to login using the security of a different application, see them logged on and filter their data based on user login credentials of the other application. Is this possible?
Shery Kemp

J
Jane 10/26/2006

Shery,
you can add the following code to your application:

SESSION("UserID") = "username"

SESSION("AccessLevel") = ACCESS_LEVEL_USER

SESSION("GroupID") = "usergroup"



where username is your actual username, usergroup is your real user group if you use group permissions on the Security tab in the ASPunner.
And then you can login in your application and go to the ASPRunner pages without authorization.

lefty 11/3/2006

Shery,

you can add the following code to your application:
where username is your actual username, usergroup is your real user group if you use group permissions on the Security tab in the ASPunner.
And then you can login in your application and go to the ASPRunner pages without authorization.



I need to use this also as I have another application that I want to use it's security and go right to my asp project without logging in ; I tried the code you supplied above ; but it looks like I would have to enter all the users ( hundreds ) and all the groups ( 20 ) to the application ; with each session variable you supplied above . Is there a way around this without having to add this to another applications login credentials evertime I have a new user and adding each users credentials to my other application?

Sergey Kornilov admin 11/4/2006

John,
you don't have to enter anything.
You just need to pass an ID of logged user to ASP application generated by ASPRunnerPro. You can use session variable or URL parameter for this purpose.
For example you can use the following URL to transfer users from your application to ASPRunner application:
tablename_list.asp?userid=xxx
Modify tablename_list.asp page by adding two following lines in the beginning:

SESSION("AccessLevel") = ACCESS_LEVEL_USER

SESSION("UserID") = request("userid")



This is it.

lefty 12/2/2006

John,

you don't have to enter anything.
You just need to pass an ID of logged user to ASP application generated by ASPRunnerPro. You can use session variable or URL parameter for this purpose.
For example you can use the following URL to transfer users from your application to ASPRunner application:
tablename_list.asp?userid=xxx
Modify tablename_list.asp page by adding two following lines in the beginning:

SESSION("AccessLevel") = ACCESS_LEVEL_USER

SESSION("UserID") = request("userid")



This is it.



I have been working with session variable that you have supplied above using a url to the list page from login form from other application . I have tested it with one of my list pages . I keep getting message ; ( You don't have permission to access this table ) .

Note: My other application uses the same fields in the database as the seurity settings setup im my project.
Need to know what needs to be changed in the list page below.
tablename_list.asp
<%

SESSION("AccessLevel") = ACCESS_LEVEL_USER

SESSION("UserID") = request("userid")
if SESSION("UserID")="" then

SESSION("MyURL")=request.ServerVariables("SCRIPT_NAME")&"?"&request.ServerVariables("QUERY_STRING")

response.Redirect "login.asp?message=expired"

response.End

end if

if not CheckSecurity(SESSION("OwnerID"),"Search") and not CheckSecurity(SESSION("OwnerID"),"Add") then

response.Write "<p>" & "You don't have permissions to access this table" & " <a href=""login.asp"">" & "Back to login page" & "</a></p>"

response.End

end if