Popup the system logged user name in login page textbox while accessing the sso application

In this post I like to cover how to get the system logged user name and how to display the user name in textbox(in login page) while accessing the application.

Problem Description:

The architecture has OAS 10.1.4.3, OAM 10.1.4.3, OID version is 10.1.4.3, and Active server. OID is using for SSO user’s store. Active server is using for client user’s store.  System login user‘s id will be same as SSO application login user’s  name.

The requirement is to get the system logged user name and display in the ltextbox( in login page) while accessing the application.

Solution is here,

1.       Take the login page backup before modified the page if it’s required.

2.       Add the below function in your script

            <script type=”text/javascript”>

                   function yourOS() { 

                               var oShell=new ActiveXObject(“WScript.Shell”)

                               un=oShell.ExpandEnvironmentStrings(“%USERNAME%”)

                               domain=oShell.ExpandEnvironmentStrings(“%USERDOMAIN%”) 

                               document.form1.username.value=un

                               document.form1.username.disabled=true

                               return un 

            }</script> 

Note: The above function will get the system user name and it’s display in the user name textbox.

3.       Calls the above function by onload method.

                             <body onload=”yourOS()”>

                             <form id=”form1″ name=”form1“>

                             USER NAME:<input type=”text” name=”text1″ id=”username“>

                             <br>PASSWORD: <input type=”password” name=”text1″ id=”pwd”> <br>

                             <br><input type=”submit” name=”text1″ id=”submit” value=”submit”>

                             </form></body>

4.       Save the page.

5.       Restart the HTTP server if required.

6.       Test the process.

I hope this post will help you

Share This Post with Your Friends over Social Media!

About the Author sarath

An Oracle Identity and Access Management professional, having working on Oracle Access Manager Single Sign-On implementations, Installation/Configuration of Identity Server, Web Pass, Web Gate, Access Gate, Policy Manager, Access Server, Policy Domains, Authentication /Authorization schemes, Single Sign-On (single and multi-domain), OIM, OVD, OID, OAAM, OIF, High Availability/Failover/ SSL deployment.

Leave a Comment:

[i]
[i]
[i]
[i]
[index]
[index]
[index]
[index]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[i]
[i]
[index]
[index]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[index]
[index]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]