Display default value of username in Login screen

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Display default value of username in Login screen

Tushar Jain
Hi,

How can one display default value of username in login screen? The default value in my case is returned by Javascript function.

Since in 1.1.0, the login fields are generated dynamically, i tried displaying the default value in 0.9.6 where login screen was independent. I wasnt successful in either versions.

In 0.9.6, I have already tried modifying LoginController.js ($scope.username="Joe"), but the default value does not reflect

Any help for 1.1.0 and 0.9.6 is appreciated.

Thanks,
Tushar Jain

Disclaimer: This message and any attachment may contain confidential, proprietary information and is intended only for the individual named. If you are not the original intended recipient and have erroneously received this message, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Hitachi MGRM Net E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Hitachi MGRM Net therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. Hitachi MGRM Net Ltd, C - 6/5, Safdarjung Development Area, New Delhi - 110016, India

'Please consider the environment before printing this e-mail'.
Reply | Threaded
Open this post in threaded view
|

Re: Display default value of username in Login screen

vnick
On Wed, Nov 20, 2019 at 3:19 AM Tushar Jain <[hidden email]> wrote:
Hi,

How can one display default value of username in login screen? The default value in my case is returned by Javascript function.

Since in 1.1.0, the login fields are generated dynamically, i tried displaying the default value in 0.9.6 where login screen was independent. I wasnt successful in either versions.

In 0.9.6, I have already tried modifying LoginController.js ($scope.username="Joe"), but the default value does not reflect


What do you mean by "default value" for the username?  The username field in a login box doesn't generally have a "default value," at least, not in my experience.  What is it you're trying to accomplish by putting some value in there??

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Display default value of username in Login screen

Tushar Jain
Hi Nick,

Thanks for the response. 
We are trying to integrate smart card with the login page. Our users are provided with a unique 16 digit card number which acts as their identity and the username. Instead of them typing it out everytime, we want guacamole to fetch it from the card. We have written a custom js to fetch the card number(i.e the username) and it is working fine. But are not able to display the card number in the username textfield. Please suggest how to go about this.

Thanks again
Tushar

On Wed, Nov 20, 2019 at 11:57 PM Nick Couchman <[hidden email]> wrote:
On Wed, Nov 20, 2019 at 3:19 AM Tushar Jain <[hidden email]> wrote:
Hi,

How can one display default value of username in login screen? The default value in my case is returned by Javascript function.

Since in 1.1.0, the login fields are generated dynamically, i tried displaying the default value in 0.9.6 where login screen was independent. I wasnt successful in either versions.

In 0.9.6, I have already tried modifying LoginController.js ($scope.username="Joe"), but the default value does not reflect


What do you mean by "default value" for the username?  The username field in a login box doesn't generally have a "default value," at least, not in my experience.  What is it you're trying to accomplish by putting some value in there??

-Nick

Disclaimer: This message and any attachment may contain confidential, proprietary information and is intended only for the individual named. If you are not the original intended recipient and have erroneously received this message, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Hitachi MGRM Net E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Hitachi MGRM Net therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. Hitachi MGRM Net Ltd, C - 6/5, Safdarjung Development Area, New Delhi - 110016, India

'Please consider the environment before printing this e-mail'.
Reply | Threaded
Open this post in threaded view
|

Re: Display default value of username in Login screen

vnick
On Wed, Nov 20, 2019 at 23:20 Tushar Jain <[hidden email]> wrote:
Hi Nick,

Thanks for the response. 
We are trying to integrate smart card with the login page. Our users are provided with a unique 16 digit card number which acts as their identity and the username. Instead of them typing it out everytime, we want guacamole to fetch it from the card. We have written a custom js to fetch the card number(i.e the username) and it is working fine. But are not able to display the card number in the username textfield. Please suggest how to go about this.

Based on what you're trying to do - authenticate with smart cards, which is essentially certificate-based, or X509, authentication - I would suggest that you write a custom authentication extension that handles that mechanism, rather than trying to squeeze the method you're using into the existing username and password authentication.  While this isn't identical to SSO authentication, looking at those modules may help you understand how they "replace" the standard username and password requirements with something else - in those cases a redirect to another page and processing of a SSO ticket, in your case the validation and parsing of a certificate stored on a smart card.

Besides avoiding trying to hack the angularjs pages, it will allow you to make sure that the authentication happens securely by writing the module in such a way that the front end (angularjs) and back end (Java application) are "synchronized" in their conversation for authenticating the user.

The manual has information on the extensions, and, honestly, just looking at the existing code will probably be as much help as anything.  And, of course, we are happy to help out here, as well 😁.

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Display default value of username in Login screen

Tushar Jain
Hi Nick,

Thanks for the suggestion. Will try to develop and a custom extension and will reach out incase i run into any issues.

Thanks 
Tushar Jain

On Sat, Nov 23, 2019 at 8:49 PM Nick Couchman <[hidden email]> wrote:
On Wed, Nov 20, 2019 at 23:20 Tushar Jain <[hidden email]> wrote:
Hi Nick,

Thanks for the response. 
We are trying to integrate smart card with the login page. Our users are provided with a unique 16 digit card number which acts as their identity and the username. Instead of them typing it out everytime, we want guacamole to fetch it from the card. We have written a custom js to fetch the card number(i.e the username) and it is working fine. But are not able to display the card number in the username textfield. Please suggest how to go about this.

Based on what you're trying to do - authenticate with smart cards, which is essentially certificate-based, or X509, authentication - I would suggest that you write a custom authentication extension that handles that mechanism, rather than trying to squeeze the method you're using into the existing username and password authentication.  While this isn't identical to SSO authentication, looking at those modules may help you understand how they "replace" the standard username and password requirements with something else - in those cases a redirect to another page and processing of a SSO ticket, in your case the validation and parsing of a certificate stored on a smart card.

Besides avoiding trying to hack the angularjs pages, it will allow you to make sure that the authentication happens securely by writing the module in such a way that the front end (angularjs) and back end (Java application) are "synchronized" in their conversation for authenticating the user.

The manual has information on the extensions, and, honestly, just looking at the existing code will probably be as much help as anything.  And, of course, we are happy to help out here, as well 😁.

-Nick

Disclaimer: This message and any attachment may contain confidential, proprietary information and is intended only for the individual named. If you are not the original intended recipient and have erroneously received this message, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Hitachi MGRM Net E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Hitachi MGRM Net therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. Hitachi MGRM Net Ltd, C - 6/5, Safdarjung Development Area, New Delhi - 110016, India

'Please consider the environment before printing this e-mail'.