Announcement Announcement Module
Collapse
No announcement yet.
How to integrate CAS with spring restful web service api ?. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to integrate CAS with spring restful web service api ?.

    Hi ,

    I have integrated spring security with cas..it works fine for me.
    But now i want to use this same login credentials for my php application(sso between spring and php web app).How can i perform this.?

    As well as how can perform login through spring restful api with cas.

    Thanks,

  • #2
    Hi,

    A PHP CAS client exists : https://github.com/Jasig/phpCAS.
    Best regards,
    Jérôme

    Comment


    • #3
      Thank you jleleu...

      I have one more doubts related to cas..I need to login to my spring-security web-app through REST api using java(CAS Restful Java Client).
      I got an example about the same cas-restful-java-client ,but it doesn't work properly.
      could you please provide some information about the same?..

      Thanks,
      Last edited by lijogp; Aug 6th, 2013, 03:36 AM.

      Comment


      • #4
        Hi,

        The CAS REST API is pretty simple, I would recommend you first try to use some browser plugin to post your requests.
        Then, I would use the REST template from Spring to do the requests against CAS : the http://blog.springsource.com/2009/03...-resttemplate/.
        Best regards,
        Jérôme

        Comment


        • #5
          Am using Mozilla rest client for checking rest urls.

          Through this link http://localhost:8080/cas/v1/tickets i had posted a username and password (with “Accept: text/plain” as a header)
          but i got login page as response form cas.
          I Am quite newbie in REST.
          Could you plesae provide a simple example ?.

          Thanks,
          Last edited by lijogp; Aug 7th, 2013, 04:51 AM.

          Comment


          • #6
            Hi,

            It should be the simple example, I mean, just calling the /v1/tickets url.
            Would you mind trying the bash example in this page just to be sure that the REST API is properly enabled in your CAS server : https://wiki.jasig.org/display/CASUM/RESTful+API ?
            Thanks.
            Best regards,
            Jérôme

            Comment


            • #7
              Yes i have tried..
              1.I have edited web.xml
              2.Add cas-rest jars in to cas lib folder.
              Through this link http://localhost:8080/cas/v1/tickets i had posted a username and password (with “Accept: text/plain” as a header)

              But i got a cas html login page as response..i didn't get a ticket.

              This is my last day to complete this assignment can you please help me?

              Thanks.

              Comment


              • #8
                Hi,

                You know we are on the wrong forum to talk about the CAS REST API.
                Would you mind opening a new thread on the CAS user mailing list (https://groups.google.com/forum/?fro...jasig-cas-user), enable DEBUG logs on org.jasig.cas and org.springframework.webflow, re-test and post them ?
                Thanks.
                Best regards,
                Jérôme

                Comment


                • #9
                  @ jleleu, I Am really sorry to again put a post here..

                  I know we can enable rest api using Spring RestTemplate .But I have some doubts about the same.

                  I have already seen a link for enableing rest api between cas server.

                  But my userService(provide user login details such as username,password) is in spring webapplication.

                  Then How can i get a service ticket for my spring security web-app(http://localhost:4185/Spring-Security-wepApp) using this link? .http://localhost:4502/cas/v1/ticket

                  Thanks
                  Last edited by lijogp; Aug 8th, 2013, 07:07 AM.

                  Comment

                  Working...
                  X