Select to view content in your preferred language

tokanValidity

1209
4
09-30-2012 09:33 AM
ChrisRiver
Occasional Contributor
Hi

I'm trying to generate a token /without/ using the identityManager class.  When I try calling generateToken (from IdentityManagerBase()) I get an error "Cannot read property 'tokenValidity' of undefined"

(i.e.)
var tokenGetter = esri.IdentityManagerBase();
var token = tokenGetter.generateToken(serverInfo,userinfo);


I'm at a loss as to where this is being thrown.  I expect there is some additional setup I need to do before I call this method, but it escapes me.  Can anyone shed light on this?

Thanks!
0 Kudos
4 Replies
ChrisRiver
Occasional Contributor
[bump]

My workflow doesn't allow for the baked in IdentityManager pop-up.  It's just not an option for me.  I can't imagine this question has never been asked before, but I haven't found any recorded answer to it!

Thanks
0 Kudos
jamieeyre
Deactivated User
I am trying to do the same without any success. Did you solve this?
0 Kudos
StevenGriffith
Deactivated User
I'm in the same boat. Anyone have an answer to this?

Steve G.
0 Kudos
FredSpataro
Frequent Contributor
Adding to the wish list... anybody figure this one out yet?

When i call generateToken, the javascript console shows a bunch of errors with "esri.config.defaults.io.proxyUrl is not set"


Which is true, that value is null.  If use the full IdentityManager class and check that property it's also null.  No proxy page in my simple test app.  Here's what I've tried so far:

Using the base class:

require IdentityManagerBase
create new IdentityManagerBase
create and add a serverinfo object with exact same values when full IdentityManager is used
call signIn or generateToken

both produce the same error.

Using the full class manually:

require IdentityManager
no https/token layer is added to the map, yet
create and add a serverinfo object with exact same values when full IdentityManager is used automatically
call signIn or generateToken

both produce the same error.

I'm watching fiddler during all this and it doesn't appear that the token request ever gets sent out, so I'd guess there a missing step or something that needs to configured when this is done manually.

The identity manager widget is nice for simple applications but it's not practical for applications that require special logins and access to secure services where these are different auth methods.
0 Kudos