You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@esme.apache.org by Richard Hirsch <hi...@gmail.com> on 2010/01/14 12:30:01 UTC

Re: How to make "Single Sign On" with ESME and another web application?

We don't support CAS yet.

If you are looking at integrating with OFBiz, look at my blog
(http://blog.esme.us/integration-with-apache-ofbiz/) to see how I did
it there.

If you need to create ESME users and get the token, then you can use
the API2 (http://cwiki.apache.org/ESME/api-20-design.html) to create
users and return the token.

D.

On Thu, Jan 14, 2010 at 12:02 PM, Chatree Srichart
<ch...@gmail.com> wrote:
> Hi all,
>
> I need to use an exist web application with ESME. How to use an exist
> account with ESME?
> or, How to use ESME with CAS server?
>
> Regards,
>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Richard Hirsch <hi...@gmail.com>.
The example I sent is in the jira item. If you click on the link, you
will find a jar file with source files.

D.

On Fri, Jan 15, 2010 at 12:01 PM, Chatree Srichart
<ch...@gmail.com> wrote:
> Thank you Richard Hirsch,
>
> But I don't know where the example you said. Can you tell me?
> And I really don't understand about "403 Forbidden" error.
>
> Regards,
>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Ethan Jewett <es...@gmail.com>.
Correction: "for authentication", not "or authentication"

On Fri, Jan 15, 2010 at 8:45 AM, Ethan Jewett <es...@gmail.com> wrote:
> Hi Chatree,
>
> The API uses sessions or authentication. I second Richard's
> recommendation to look at an existing client to see how that works.
> Essentially you need to POST api2/session with your token in order to
> get a session ID, then you need to include that session ID in all
> subsequent requests as a cookie header with the JSESSIONID identifier.
>
> Once you do this, try making your GET request to /api2/users again and
> you should be more successful.
>
> If you're trying to access the API from Java, you may want to consider
> extending the Java client that Richard mentions.
>
> Thanks,
> Ethan
>
> On Fri, Jan 15, 2010 at 6:01 AM, Chatree Srichart
> <ch...@gmail.com> wrote:
>> Thank you Richard Hirsch,
>>
>> But I don't know where the example you said. Can you tell me?
>> And I really don't understand about "403 Forbidden" error.
>>
>> Regards,
>>
>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Ethan Jewett <es...@gmail.com>.
Hi Chatree,

The API uses sessions or authentication. I second Richard's
recommendation to look at an existing client to see how that works.
Essentially you need to POST api2/session with your token in order to
get a session ID, then you need to include that session ID in all
subsequent requests as a cookie header with the JSESSIONID identifier.

Once you do this, try making your GET request to /api2/users again and
you should be more successful.

If you're trying to access the API from Java, you may want to consider
extending the Java client that Richard mentions.

Thanks,
Ethan

On Fri, Jan 15, 2010 at 6:01 AM, Chatree Srichart
<ch...@gmail.com> wrote:
> Thank you Richard Hirsch,
>
> But I don't know where the example you said. Can you tell me?
> And I really don't understand about "403 Forbidden" error.
>
> Regards,
>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Chatree Srichart <ch...@gmail.com>.
Thank you Richard Hirsch,

But I don't know where the example you said. Can you tell me?
And I really don't understand about "403 Forbidden" error.

Regards,

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Richard Hirsch <hi...@gmail.com>.
Someone added an initial api2 client to a jira item
(http://issues.apache.org/jira/secure/attachment/12426366/esme2java.jar)
- why don't you look there for an example of using authentication in a
java implementation.

D.

On Fri, Jan 15, 2010 at 4:05 AM, Chatree Srichart
<ch...@gmail.com> wrote:
> Hi, Richard Hirsch
>
> I have tried to call "/api2/users" API but I got error like this:
>
> "Server returned HTTP response code: 403 for URL:
> http://localhost:8080/api2/users.xml"
>
> Can you tell me what I was wrong?
>
> Regards,
>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Chatree Srichart <ch...@gmail.com>.
[Previous post I missed]

But when I entered "http://localhost:8080/api2/users.xml" to web browser I
got XML message from ESME server like this:

=== XML code ===
<api>
  <users>
    <user>
      <id>1</id>
      <nickname>myUsername</
nickname>
      <image>None</image>
      <whole_name>My Whole Name</whole_name>
    </user>
  </users>
</api>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Chatree Srichart <ch...@gmail.com>.
But when I entered "" to web browser I got XML message from ESME server like
this:

=== XML code ===
<api>
  <users>
    <user>
      <id>1</id>
      <nickname>myUsername</nickname>
      <image>None</image>
      <whole_name>My Whole Name</whole_name>
    </user>
  </users>
</api>

Re: How to make "Single Sign On" with ESME and another web application?

Posted by Chatree Srichart <ch...@gmail.com>.
Hi, Richard Hirsch

I have tried to call "/api2/users" API but I got error like this:

"Server returned HTTP response code: 403 for URL:
http://localhost:8080/api2/users.xml"

Can you tell me what I was wrong?

Regards,