Browser Autentication

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
franceschinl
Posts: 15
Joined: 06 Apr 2021, 06:52

Browser Autentication

Post by franceschinl »

Hello Word.
I'm try to search but i don't find a ticket about this improvement
I would like to implement Mantis to recognize the user who is connected to the PC at that time without having to ask a username and password again.
is it possible?
in case of mantis don't recognize the user, mantis ask me to login with username and password.

Is Possible?

Thanks
Last edited by franceschinl on 26 Apr 2021, 15:11, edited 2 times in total.
cas
Posts: 1065
Joined: 11 Mar 2006, 16:08
Contact:

Re: Browser Autentication

Post by cas »

Yes you can, use the ADlogin plugin. :mrgreen:
franceschinl
Posts: 15
Joined: 06 Apr 2021, 06:52

Re: Browser Autentication

Post by franceschinl »

cas wrote:
20 Apr 2021, 14:44
Yes you can, use the ADlogin plugin. :mrgreen:
My server isn't in Domain. is possible have a simple auth (ex: i've read username from system and enter in Mantis directly)

Thanks
cas
Posts: 1065
Joined: 11 Mar 2006, 16:08
Contact:

Re: Browser Autentication

Post by cas »

you can adjust the ADlogin plugin to read the user logged on to the pc.
Simply retrieve the info from a shell command.
If you run the cmd prompt, you can see who is logged on with the following command:
echo %username%
if you pipe this into a file like
echo %username% > userinfo.txt
You can simply read the content of the file.
Be aware that this is not a very safe option :mrgreen:
franceschinl
Posts: 15
Joined: 06 Apr 2021, 06:52

Re: Browser Autentication

Post by franceschinl »

cas wrote:
23 Apr 2021, 11:55
you can adjust the ADlogin plugin to read the user logged on to the pc.
Simply retrieve the info from a shell command.
If you run the cmd prompt, you can see who is logged on with the following command:
echo %username%
if you pipe this into a file like
echo %username% > userinfo.txt
You can simply read the content of the file.
Be aware that this is not a very safe option :mrgreen:
this is my code

function init() {
plugin_event_hook( 'EVENT_CORE_READY', 'login_ad' );
}

function login_ad() {
if ( isset($_SERVER['AUTH_USER'])) {
$temp = explode('\\', $_SERVER['AUTH_USER']);
if ($temp[1] == "") {
$name = $temp[0];
} else {
$name = $temp[1];
}
$ok=auth_attempt_script_login( $name );
}
}
}

please do you help me to modify (if user are exist: login; if user aren't exist show me login page)

Thanks
cas
Posts: 1065
Joined: 11 Mar 2006, 16:08
Contact:

Re: Browser Autentication

Post by cas »

1. when one logs on the pc, a file need to be created holding their username.
2. In the function Login_ad, you read the file
3. place the value in $name
4 all this 92 & 3) just before
$ok=auth_attempt_script_login( $name );
franceschinl
Posts: 15
Joined: 06 Apr 2021, 06:52

Re: Browser Autentication

Post by franceschinl »

cas wrote:
23 Apr 2021, 13:07
1. when one logs on the pc, a file need to be created holding their username.
2. In the function Login_ad, you read the file
3. place the value in $name
4 all this 92 & 3) just before
$ok=auth_attempt_script_login( $name );
No. I found another solution...... (IDK what is)
cas
Posts: 1065
Joined: 11 Mar 2006, 16:08
Contact:

Re: Browser Autentication

Post by cas »

so what did you do?
franceschinl
Posts: 15
Joined: 06 Apr 2021, 06:52

Re: Browser Autentication

Post by franceschinl »

cas wrote:
23 Apr 2021, 16:23
so what did you do?
i've install AD and LDAP but not work.
in ldap configuration i need insert admin user and passowrd (not good)
but the browser doesn't recognize my username from browser and i insert manually user and password (same of LDAP)

Solution?
franceschinl
Posts: 15
Joined: 06 Apr 2021, 06:52

Re: Browser Autentication

Post by franceschinl »

you have try to use BasicAuth?
Post Reply