How OOB Login widget validates user internally?

Arun101
Kilo Contributor

Hi Anonymous,

I am trying to understand how the service portal OOB Login widget is validating users and returns responses.

So far, I analyzed the default login widget. I found an angular HTTP post request is being submitted along with the username and password for authentication. Then the submitted details getting validated somewhere in the NOW platform (I guess, it should be Script Include).

The URL -  https://instance.service-now.com/angular.do?sysparm_type=view_form.login

Client script is as follows,

return $http({
	method: 'post',
	url: url,
	data: $.param({
	        'sysparm_type': 'login',
		'ni.nolog.user_password': true,
		'remember_me': !!c.remember_me ? true : false,
		'user_name': username,
		'user_password': password,
		'get_redirect_url': true,
		'sysparm_goto_url': isLoginPage ? null : $location.url()
	})

 

I wonder how view_form.login is connected to Script Include or whatever. A million thanks to you for explaining to me how the angular post is linked with service now authentication.

 

Best Regards,

Arun

1 ACCEPTED SOLUTION

Sebastian R_
Kilo Sage

I think you are looking for the Installation Exit "Login". This should be the endpoint for the request.

https://<your_instance>.service-now.com/nav_to.do?uri=sys_installation_exit.do?sys_id=7cfa46450a0a0aa90056aa3101b0bd7c

find_real_file.png

View solution in original post

3 REPLIES 3

Sebastian R_
Kilo Sage

I think you are looking for the Installation Exit "Login". This should be the endpoint for the request.

https://<your_instance>.service-now.com/nav_to.do?uri=sys_installation_exit.do?sys_id=7cfa46450a0a0aa90056aa3101b0bd7c

find_real_file.png

Thank you, Sebastian. This is the area that I did not check and I am checking now. I couldn't understand why the debugger breakpoints are not working if this is the entry point.find_real_file.png

 

Note - I checked both login failed and login success cases.

Could you please help?

Regards,

Arun

 

I´ve noticed that the debugger is not working always. Maybe it is easier to put logs (gs.log) into the script