This topic has 25 replies, 6 voices, and was last updated 4 years ago by Dipanshu.goyal.

  • Author
    Posts
  • #13723
     Exploring_Singh
    Participant

    @manasvi: Do this internal oAuth tool has same page where user name password is to be entered ? If yes you have to redirect the user to this redirect URL where huser authenticate himself and tool returns you token ID

    #13724
     manasvi
    Participant

    Yes it redirects to login page and after successful login I redirect it to OAuth2Proxy.jsp with params ‘state'(containing state sent by openam) and ‘code'(containing access token) which redirects to http://openam.example.com:8080/openam/json/authenticate?realm=/ . In the response I get {“code”:500,”reason”:”Internal Server Error”,”message”:”Authentication Error!!”}. Also, iPlanetDirectoryPro is not set in cookies but JSessionId and NTID are set in the cookie.

    • This reply was modified 6 years, 1 month ago by manasvi.
    #13736
     Mahesh Algamwar
    Participant

    @tejansh @jang2212 @peter-major

    Any help ? How to read NTID from response cookie as it seems to be secure and not able to read it from the code. Stuck from last to days, any pointer help much appreciated.

    #13737
     Peter Major
    Moderator

    Just because a cookie is secure, it will still show up on the HTTP response header “Set-Cookie”, your http client should be able to parse/read it just fine.

    #13757
     Mahesh Algamwar
    Participant

    @peter-major @jang2212, @tejansh

    Thanks for the response Peter, but still I am not able to read the Cookie. May be my application is angularjs application where I am trying to read the Cookie, is there any settings that need to perform for Angularjs. I have created authentication module of type OAuth2.0/OpenID Connect. I am able to see NTID Cookie getting set inside Cookie in Postman but when trying to read that Cookie in my application (build on Angularjs 2.0), I am not able to get that. Please do suggest if any setting that I need to perform at OpenAm level.

    #13759
     Peter Major
    Moderator

    Does your AngularJS application (i.e. the “server” side) send the HTTP call to the json/authenticate endpoint, or do you just send an AJAX request there via the user-agent?

    #13761
     Mahesh Algamwar
    Participant

    @peter-major @jang2212, @tejansh

    I have tried using XHR instead of AngulaJs2 but still facing same issue.. Set-Cookie returns null.

    #13772
     Mahesh Algamwar
    Participant

    @peter-major @jang2212, @tejansh

    Hi Peter, My AngularJS application just sends an AJAX request.

    #13782
     Mahesh Algamwar
    Participant

    @peter-major @jang2212, @tejansh

    I am one more query aprt from custom login page. I wanted understand once user authenticated against social authentication site (facebook/Linkedin). I get the SSO token from OpenAM. Now I wanted to get user profile details from social authenticated side against with user authenticated (facebook/Linkedin). But when I am trying to use rest api call to fetch user profile getting error as “Invalid access token”. So it seems I wont be able to get user profile from Socail side using SSO token.

    One way is I can map linkedin/ facebook data while authentication and store in openam and get required attribute from openam. But because of some application complexity we do not want to follow this approach. Guys can you help to understand is there any way to get Oauth token which send by facebook/linkedin at the time of authentication so that I can reuse for fetching required detail without asking user credential second time.

    #13830
     Exploring_Singh
    Participant

    The redirect URL will be returned as the authentication will be further done by your module and it will return you the correct landing page. U have to land to you oauth module page where it take input and returns it to correct return path.

    #23818
     Dipanshu.goyal
    Participant

    I have forgerock instance deployed on local and when I hit the url it returns authId in response as I can see in safari developer tool.As per my requirement I want to read it in JavaScript. is there anyway to save it in a cookie (as someone described above) so I can read it ?

    Please help !!

Viewing 11 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?