Getting the Authenticated Username

I've been looking for the answer to a very simple question all afternoon.
When a client calls an EJB method, is there any way to find out what/who the original username/principle was?
Something like ...
@Stateless
public class Hello implements HelloInterface {
@RolesAllowed("hello")
public String sayHello() {
String username = /* INSERT CODE HERE */
return "Hello " + username;
I understand that I pass these credentials when I lookup the Remote Bean ... are they held anywhere for the duration of the request?
Thanks in advance.

Hi,
you are not on the latest JDeveloper 11g release but the fisrt production build I assume. Here the EL builder only shows username. In the current production buld, all other EL options are displayed as well. However, typing the EL by hand should work at runtime
Frank

Similar Messages

  • How to get the Portal Username to SAP Transaction IView ( ABAP cust repor )

    Hi Experts,
    We have an ABAP program that will be exposed in portal as SAP transaction IVIEW.  However the username that is being displayed in the report is the username that is defined in SICF > SAP > BC > GUI > ITS > WEBGUI.  I tried to remove the username and password defined, changed the procedure to Alternative Logon Procedure and deleted some logon procedure list retained Basic and SSO Authentication but we are getting DDIC username.  We have successfully implemented SSO, and it works in Personal Information of Standard ESS.  The following are configure in our portal:
    1.  We have set SSO ticket
    2.  We are using User Mapping for portal and ABAP System
    3.  Retain Basic and SSO authentication
    what could be the cause why the program (iview) is still getting the user instead of Portal Username? How can we get the portal username for our abap customized report exposed in iview

    Hi,
    Make sure that the System you are using to connect to R3 has Log On Method and Authentication Ticket Type properties has SAP LOGON TKT as the value selected.
    Path: System Administration --> System Configuration ---> Systems....
    Regards,
    SrinivaS

  • How to get the windows username in jsx

    Hello,
    I have a JSX script in "My Documents\Adobe Scripts" to make it trusted script. I have another text file I need to read from JSX. Since the location depends on logged in user, I need to find the windows username. If anyone know how to get the windows username from jsx please reply.
    Thank you very much.
    Regards
    Nima.

    Hey,
    You can get username like this:
    var myUsername = $.getenv('username');
    You could also get My Documents folder like this:
    var myDocFolder = Folder.myDocuments;
    Hope that helps.
    Marijan (tomaxxi)
    http://tomaxxi.com/

  • TS1398 I can't get the authentication page to load to input a username for wifi network

    I can't get the authorization page to upload so I can enter wifi network username & password

    Whenever I log into icloud.com
    Using what version of which browser?
    iCloud.com requires Safari 6 or later, Firefox 22 or later, or Google Chrome 28 or later. Have you tried all of those?
    If you have, have you tried clearing your browser cache and cookies?
    For the first tine since 1989 I'm thinking about buying a PC.
    You'd have exactly the same problems on an 8 year old PC too. It's a bit unreasonable to expect such an old Mac to continue to be compatible as software is constantly updated.
    Saying that, I'm still able to access iCloud.com successfully in Safari v5.0.6 on a PowerPC Mac running Mac OS X 10.5.8, so the problem you're having is likely to be a browser issue, not something inherently wrong with the computer.
    Since all this crap started, Mail won't download my Mac.com or me.com email.
    The iCloud.com website is totally unconnected to Mail's ability to download email via IMAP. Have you checked the mail server settings are correctly setup and up-to-date?

  • Getting the NT UserName

    I have various posting on NT authentication, I am looking for getting the client's username from NT who is accessing my server through HTTP. Is this possible, if so what class i should use in java.security package.
    I will do the authentication by comparing this username with my list of users in DB.

    The answer is simple: You cant.
    You can enforce your clients sending their user name in the HTTP session by using servlets or JSP, but this requires that the client browser/application sends the user name in the HTTP header or servlet call.
    In short terms:
    There is no direct connection between the NT user name and the HTTP request on your web server.
    Oliver

  • Getting the NT username of the viewer of the JSP page..

    Hi.
              I was wondering if it is possible to get hold of the client's NT username
              from within a JSP or servlet. All I want is the current logged in username
              of the viewer of the page. Is there any way to do this in Java at all?
              It is possible in ASP + IIS and I guess I could forward the username for an
              ASP-page, but I don't think that is a very clean way of doing it.
              If I use '<%=java.lang.System.getProperty("user.name")%>' in a JSP-page I
              will only get the user of the server where the JSP is running:
              Any suggestions?
              - Oystein Saebo -
              

    I was wondering if it is possible to get hold of the client's NT          username
              > from within a JSP or servlet. All I want is the current logged in
              username
              > of the viewer of the page. Is there any way to do this in Java at all?
              If you use IIS as http proxy to WLS you can call the getRemoteUser()
              method. On WLS6.0SP1 you get the NT domain\user back.
              Regards,
              Merg
              

  • How to get the admin username & password for JMX connection

    Hi All,
    I need to retrieve the username & password and pass it to the JNDI to get the JMX connection for MBean Server. I will be doing this locally.
    Is there an API that I can use to retrieve this information ?
    thanks
    -sheshi

    Forgot to mention, I am using WebLogic 9.1

  • How can i get the authenticity of facebook to change

    so im using a public wifi connection. when i try to go to facebook it says : SECURE CONNECTION FAILED: The connection to the server was reset while the page was loading.
    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.
    HOW DO I FIX THIS!?!?

    Apologies for the seemingly arcane nature of this suggestion, but could you see whether there is more detailed information about this problem in the Browser Console? Here's how:
    * Open the Browser Console using Ctrl+Shift+j or the Developer menu
    * Once the console settles down, click the Clear button on the top bar
    * Leaving the console window open, switch back over to Facebook and reload (Ctrl+r
    * Switch back over to the console and look for security-related messages. These might have a red triangle at the left. Please copy/paste the messages into a reply.

  • How to get the current username (Adf Security) in a VO query?

    Hi all,
    I want to filter a VO query using the current username in the where clause. What is the correct object in the security context to do that?
    Thanks.
    JDEV 11.1.1.7

    Hi,
    Do not directly put the username in your query, you query should be something similar to:
    select abc, bcd, user_code FROM TABLE
    WHERE (USER_CODE = :LoggedInUser)
    then create a bind variable "LoggedInUser" of type String with value type as expression and value as (adf.context.securityContext.userName)
    - Lalit

  • Get the WinNT username without login in F6i client

    Hi,
    I must read the WinNT username without login (P-F-Trigger)
    in Forms 6i client.
    This is usefully to create a login.
    Thanks,
    Friedhold

    If your database is 8i and above, you can use sys_context built-in.
    For example:
    select sys_context('userenv','os_user') from dual;
    It will give you OS login user name.
    However you can not directly use sys_context in Form 6i(Believe or not, Form 6i is built on Oracle 8 not 8i). You have to create a function to return the user name and call the function in Form.

  • How do i get the login username?

    Normally a portlet could use <portletrequest>.getRemoteUser(), but ops returns a malformed user name (uppercased and with a number, so 'user' gets returned as 'USER[1]'.
    Is there any way to obtain/restore the original user name that the user used to login?

    Let me get this straight:
    I am running a jsr168 compliant portlet within oracle and at no time do i have an object from the oracle.portal.provider.v2-package tree.
    The objects i see in my debugger come from the oracle.webdb.wsrp.server package tree and somehow oracle mixes all up.
    So the question is:
    How do i get the correct remote user name if my base reference is a oracle.webdb.wsrp.server.RenderRequestImpl or a oracle.webdb.wsrp.server.RenderResponseImpl?

  • When I add users as managers or to send as in shared mailboxes I get the test username applied

    I have two users [email protected] [email protected], Both users were added to the test group with onmicrosftonline.com as [email protected] and [email protected] The .temp was removed when we went to our own domain now
    when I add jane.doe to a shared mailbox I see the jane.doe.temp for the send as but full access displays her name correctly. When I add John.Smith as a manger he is displayed as John.Smith.Temp. 
    Thank you.  

    Hi,
    Please check the name in OWA.
    To solve this issue, you can try to clear up nickname cache.                
    Here are some related information for you.
    How to reset the nickname and the automatic completion caches in Outlook:
    http://support.microsoft.com/kb/287623
    How to reset nickname cache for all outlook 2010 users:
    http://social.technet.microsoft.com/Forums/en/exchange2010/thread/f419cc62-d4fe-4ac4-aed5-cab6b2c02faf
    Thanks.

  • Provide authenticated username as parameter to a business service in OSB 12c

    Dear OSB/OSB experts,
    I have the following issue:
    1. I have a web service that would accept username as a parameter in the SOAP request in order to do some internal authorization checks (filtering database rows, tables, etc.)
    2. I want to connect that web service as business service in OSB 12c
    3. The proxy service should NOT accept username as parameter
    4. The proxy service should be protected via OWSM policy for authentication (either against the WLS authentication providers or through SAML tokens validation)
    Based on the above is there any mechanism in the implementation of the proxy service to get the authenticated username from the security context and provide it as a parameter to the business service?
    The authentication policy could use SAML tokens between two WLS domains - one will be running the WLS where proxy service clients will be running and the other - for the SOA 12c.
    Many thanks in advance,
    Anatoli

    HI,
    u can use Conditional Branching
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1061670
    Split join would be used in case u need to split your request and call your Business Service in Serial/parallel & then gather resposnes from multiple callouts to have single response
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/splitjoin.html#wp1137258
    Abhinav

  • Use ADF Managed Bean to get the username in BPM Workspace

    Hi all,
    I used JSF and ADF to build the UI of human task. And I want to get the username of the user who is manipulate on BPM Workspace. For example, an ADF form can display the username of current user in BPM Workspace. I also try this approach: use Manage Bean, and bind this bean to a output text in ADF form. The code fragment I use to get the current username is:
    ADFContext.getCurrent().getSecurityContext().getUserPrincipal().getName();
    But it does not work. The value I get is Anonymous.
    So, plz help me solve this problem

    Hi, please try this function as below:
    public String getUserLogin() throws WorkflowException,
    BPMIdentityException,
    BPMUnsupportedAttributeException {
    String userId = "";
    IWorkflowServiceClient wfSvcClient;
    ITaskQueryService queryService;
    IWorkflowContext wfContext;
    // Get username of User Login
    String contextStr = ADFWorklistBeanUtil.getWorklistContextId();
    wfSvcClient = WorkflowService.getWorkflowServiceClient();
    queryService = wfSvcClient.getTaskQueryService();
    wfContext = queryService.getWorkflowContext(contextStr);
    userId = wfContext.getUser();
    return userId;
    Regards.

  • How to get the current user name in Provider hosted app using appOnlyAccessToken

    Hi, 
    Please help me, how to get the HostWeb UserName in Provider Hosted App
    i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
    Below code does not return current user who Log in in hostweb, it is returning
    SharePoint App (app@sharepoint)
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;
    Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
    app prompts for credentials 
    HttpContext.Current.User.Identity.Name
    Thanks
    Ram

    Hi,
    Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
    then 
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;will return proper user Name.
    HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

Maybe you are looking for

  • Syncing music from Laptop and desktop, why can't I do both?

    I read that you can use more than one machine, yet when I uploaded Itunes to my desktop, it says that I can only sync to one computer (my laptop)...will someone explain how this works? I would like to use both, and they are both mines, so why can't I

  • How do I load data into my palm??

    Hi I was wondering how I can get new data for my database into my palm. I've got a text-database and I want to try to get it in the Palm and make a program for it. So my problem is: How can I get data into the mobile device without typing it myself.

  • Linked Text Boxes

    I need to create a linked text box allows text to automatically flow from say the bottom of page 1 to the top of page 2. I created a two page document using the "blank" template. Page 1 is 2-column and Page 2 is single column. Text is not flowing fro

  • A slightly complex date question

    Hello, I have a series of date ranges, for example: 08/02/2008-08/04/2008 07/06/2007-07/10/2007 06/05/2006-06/12/2006 The user enters another set of dates: 08/01/2008-08/04/2008 I need to make sure that the range of dates they enter do not overlap wi

  • My new hard drive does not allow me to load programs on my IMac. It doesn't recognize my administrator password.  How can I correct it?

    my new hard drive does not allow me to load programs on my IMac. It doesn't recognize my administrator password.  How can I correct it?