esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ethan Jewett <esjew...@gmail.com>
Subject Re: integration-admin role required for api2 calls ?
Date Fri, 16 Jul 2010 10:59:04 GMT
Yay! Not a problem at all - please do not hesitate to ask if you have
any questions. I've been pretty busy lately with other things, but
I'll usually answer within a day.

Regarding the integration-admin role, this is not something you
normally need, but if you want to see an example of assigning the role
to a user, then take a look in the test configuration (.props ?)
files.

Ethan

On Friday, July 16, 2010, Imtiaz Ahmed H E <in.imtiaz@gmail.com> wrote:
> Thanks !
>
> Ethan, I have it going... Thanks for the hand-holding and patience...and sorry for the
trouble...
>
> With mvn jetty:run and token created with that I have...
>
> imtiaz@imtiaz-20100131 /cygdrive/d/temp
> $ curl --dump-header headers -d "token=RKATUYRPVMTG5MVRVKGSXDFS4CH5ZROO" http:/
> /localhost:8080/api2/session
> <?xml version="1.0" encoding="UTF-8"?>
> <api><session><user><id>1</id><nickname>imtiaz_jr</nickname><image>None</image>
> whole_name>I A  H E jr</whole_name></user></session></api>
>
> imtiaz@imtiaz-20100131 /cygdrive/d/temp
> $ cat headers
> HTTP/1.1 200 OK
> Expires: Thu, 15 Jul 2010 22:23:48 UTC
> Set-Cookie: JSESSIONID=qvaftwfikare1k05t6aiie2wn;Path=/
> Content-Length: 182
> Date: Thu, 15 Jul 2010 22:23:48 UTC
> Pragma: no-cache
> Content-Type: text/xml; charset=utf-8
> Cache-Control: no-cache; private; no-store
> X-Lift-Version: 2.0-SNAPSHOT
> Server: Jetty(6.1.24)
>
>
> imtiaz@imtiaz-20100131 /cygdrive/d/temp
> $ ~
> ----- Original Message ----- From: "Richard Hirsch" <hirsch.dick@gmail.com>
> To: <esme-dev@incubator.apache.org>
> Sent: Thursday, July 15, 2010 11:05 PM
> Subject: Re: integration-admin role required for api2 calls ?
>
>
> 2010/7/15 Imtiaz Ahmed H E <in.imtiaz@gmail.com>:
>
> Also, Ethan, I seem to recall Dick Hirsch telling me you need to be have an
> integration-admin role to create tokens or whatever? How do I manage that ?
>
>
> This is just if you use the api2 interface to create a new user + tokens.
>
>
>
> ----- Original Message ----- From: "Imtiaz Ahmed H E" <in.imtiaz@gmail.com>
> To: <esme-dev@incubator.apache.org>
> Sent: Thursday, July 15, 2010 7:55 PM
> Subject: Re: integration-admin role required for api2 calls ?
>
>
>
> Makes sense.
>
> For a quick try-out of this would you tell me
> 1. How to create a user/login...user is 'imtiaz2', lets say...
> and
> 2. Create a token through the api with mvn jetty:run of esme...
>
> I guess that's it for now and I'll try it out. Looks like that will solve
> this conundrum(!) of mine which seems to be born out of my ignorance ! :(
>
> Imtiaz
>
> ----- Original Message ----- From: "Ethan Jewett" <esjewett@gmail.com>
> To: <esme-dev@incubator.apache.org>
> Sent: Thursday, July 15, 2010 7:44 PM
> Subject: Re: integration-admin role required for api2 calls ?
>
>
> Hi Imtiaz,
>
> It looks like it's not finding the token when you are running using
> Jetty. Since I believe ESME will use a different datastore when
> running under Tomcat than it uses when running under Jetty, I think
> you will need to create a user and a token under Jetty, then use that
> token.
>
> Does that sound right to you? I could be totally off-base here, but
> that would be the first thing to check.
>
> If the token really does exist under Jetty, then can you change your
> println statement to the following and we'll go from there:
>
> auth <- { println("****token = " + token)
>
> Thanks,
> Ethan
>
> 2010/7/15 Imtiaz Ahmed H E <in.imtiaz@gmail.com>:
>
>
> Ethan, hopefully you will be able to point me the way here...
>
> I have included in this mail at the end, addSession() in API2.scala with
> some debug println's introduced. With this here's what I get----
>
>
> -------------------------------------------------------------------------------------------
> ------------------With mvn install and executing Esme in Tomcat curl
> output
> is ---------------------
>
> imtiaz@imtiaz-20100131 /cygdrive/d/temp
> $ curl --dump-header headers -d "token=HEZTQKM525SAMIPN4EDVRUOGHI40AKBL"
> http:/
> /localhost:8080/esme-server-apache-esme-1.0-RC1-incubating/api2/session
> <?xml version="1.0" encoding="UTF-8"?>
>
> <api><session><user><id>3</id><nickname>imtiaz2</nickname><image>None</image><w
> ole_name>I A 2 H E</whole_name></user></session></api>
>
> imtiaz@imtiaz-20100131 /cygdrive/d/temp
> $ cat headers
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Set-Cookie: JSESSIONID=C60F80AD16EFD5BE6E55231EE6C7651D;
> Path=/esme-server-apac
> e-esme-1.0-RC1-incubating
> Expires: Thu, 15 Jul 2010 13:44:35 UTC
> Date: Thu, 15 Jul 2010 13:44:35 GMT
> Pragma: no-cache
> Cache-Control: no-cache; private; no-store
> X-Lift-Version: 2.0-SNAPSHOT
> Content-Type: text/xml;charset=utf-8
> Content-Length: 178
>
>
> imtiaz@imtiaz-20100131 /cygdrive/d/temp
> $
>
> -------------------------and in the Tomcat log
> window....------------------------------
>
> INFO: Server startup in 25875 ms
> ****auth =
> Full(org.apache.esme.model.AuthToken={user=3,uniqueId=HEZTQKM525SAMIP
> N4EDVRUOGHI40AKBL,createdDate=Sun, 11 Jul 2010 11:47:30
> UTC,id=2,description=MyS
> econdToken})
> ****user =
> Full(org.apache.esme.model.User={validated=false,uniqueId=0ZYRGE1WUDQ
> 5EZJTPZBAV5OIB5AHX0PK,nickname=imtiaz2,firstName=I A 2,lastName=H
> E,imageUrl=,ti
> mezone=Asia/Calcutta,superUser=false,locale=en_US,id=3})
> INFO - Service request (POST)
> /esme-server-apache-esme-1.0-RC1-incubating/api2/s
> ession took 218 Milliseconds
> WARN - Going to buffer response body of large or unknown size. Using
> getResponse
> BodyAsStream instead is recommended.
>
>
> ------------------------------------------------------------------------------
> -----------------

Mime
View raw message