Search code examples
javaweblogicoracle-adf

Login without Login Page


I have java ADF Web Application , and its in our company and we use secure network so can i Authenticate the users depend on there login to windows ... if we can get the user Who login to the windows we can do this

i try some commands in java like String username = System.getProperty("user.name"); System.getenv("USERNAME"); but all give me server user not client

and i try

request.getRemoteUser() ... it always return null until i do SSO login and i don't need SSO cause the user is login by his account to Windows

Can any one Help me


Solution

  • If you would like the user logged in to your application based on his logging into a windows workstation, then you are basically asking for Single Sign-on (SSO). In that case, request.getRemoteUser() would be the right method to call.

    You could also inspect the request headers and find the header that is populated with the username and then fetch it's value via request.getHeader("USER_HEADER_NAME").