Expand my Community achievements bar.

SOLVED

External authentication

Avatar

Former Community Member
Hi,

when trying to run the ExternalAuthentication app from the
cocomo example the following error appears:




Error: error getting ticket: [Event type="error"
bubbles=false cancelable=false eventPhase=2]

at
com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/onTicketError()[C:\work\main\connect\cocomo\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedServices.as:104]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at
com.adobe.rtc.session.sessionClasses::SingleUseTicketService/onComplete()[C:\work\main\connect\cocomo\src\com\adobe\rtc\session\sessionClasses\SingleUseTicketService.as:99]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/onComplete()





Obtaining the authentication key seems to work properly. And
I submit this key as URL-encoded String via flashVars to the SWF.



Thanks

Marc

1 Accepted Solution

Avatar

Correct answer by
Employee
Ah! I think I found what the problem is!



You are passing "test" as the role, when it should be a
number (0-100).

I should have made it more explicit in the API (and I'll fix
them for next release) but the value you pass is the numeric value
expected by cocomo (passed as a string, since I am just passing it
as part of the ticket)



I wish the error was more useful (it's the message from a
conversion exception, and I thought I tried that ):



Sorry for the inconvenience...

View solution in original post

5 Replies

Avatar

Employee
What did you use to get the authentication session and
generate the token ? Any particular language ?



And, did you copy the account shared secret from the
dev-portal to your application ?



Can you get a trace of the HTTP requests going from your
client to the server ? Or send us info about your account so that I
can check what's happening server-side ?



(sorry for the many questions but the stack trace doesn't
really tell me much :)

Avatar

Former Community Member
I used the code from SDK/extras/scripts/groovy/cocomo.groovy.





def am = new AccountManager(<ACCOUNT_URL>)

am.login(<ADOBE_DEV_ID>,<PW>)

def session = am.getSession(<ROOM_NAME>)

session.getAuthenticationToken(<SHARED_SECRET>,
ARBITRARY_NAME_STRING, ARBITRARY_ID_STRING,
ARBITRARY_ROLE_STRING)




In flex I use the generated token and firebug shows the
following request:



GET
https://na2.connectnow.acrobat.com/app/ticket?exx=<THE_TICKET>&instance=<MYINSTANCE>/test



Here is the response:


<result>

<status code="error"
subcode="for-input-string:-"test""/>

</result>






Avatar

Correct answer by
Employee
Ah! I think I found what the problem is!



You are passing "test" as the role, when it should be a
number (0-100).

I should have made it more explicit in the API (and I'll fix
them for next release) but the value you pass is the numeric value
expected by cocomo (passed as a string, since I am just passing it
as part of the ticket)



I wish the error was more useful (it's the message from a
conversion exception, and I thought I tried that ):



Sorry for the inconvenience...

Avatar

Former Community Member
Great, that fixed it!

btw. Is there any mapping of roles/rights to those number
values?

When using 0 or 1 I get a Permission Exception



Error: MessageManager.createNode : insufficient permissions
to create node



Using 100 and everything works fine.



Thanks for the quick help...

Avatar

Former Community Member


Hi syzygymz,



The idea here is that only UserRoles.OWNER (which does ==
100) can create new CollectionNodes in a room. Most collaboration
components (Chat, SharedWhiteboard, etc) add CollectionNodes to the
room when they are first run, in order to publish and subscribe
data messages. Once a CollectionNode has been added to a room, it's
permanently there, so subsequent users can use it without needing
to be an OWNER.



hope that helps

nigel