Bringing ArcGIS Server Authentication Beyond Map Applications

2601
3
Jump to solution
09-13-2013 05:08 PM
NathanDorman
New Contributor II
I'm trying to learn how to bring the Arcgis Server 10.1 built-in authentication to the rest of my .net application. I was wondering if anyone has tried, and could share their experience/suggestions. I've read the documentation at https://developers.arcgis.com/en/authentication/non-oauth2.html, but I'm not familiar with how to use tokens. I would refer to a .Net SDK, but I don't know which one to pick from all the Microsoft options. Can anyone point me to any resources regarding this topic?

Thanks
0 Kudos
1 Solution

Accepted Solutions
NathanDorman
New Contributor II
Seems I've found my solution.
I first generate the token from /arcgis/tokens/generateToken. Then write the token to a cookie named, agstoken. From there, I just have to test the validity of the token. The easiest method I could come up with is to try access a folder that requires authentication. If I don't get an http 400 code, then I know I'm logged in/have a valid cookie.

I would have gone with appending the token to a url, but it seems that appending does not work when trying to access private directories.

View solution in original post

0 Kudos
3 Replies
AnttiKajanus1
Occasional Contributor III
Check this http://www.arcgis.com/home/item.html...1a8bcadaac692a to get started with OAuth logins.
0 Kudos
NathanDorman
New Contributor II
Am I missing something? I thought the documentation was pretty clear that OAuth is not supported for servers not associated with ArcGIS Online.
0 Kudos
NathanDorman
New Contributor II
Seems I've found my solution.
I first generate the token from /arcgis/tokens/generateToken. Then write the token to a cookie named, agstoken. From there, I just have to test the validity of the token. The easiest method I could come up with is to try access a folder that requires authentication. If I don't get an http 400 code, then I know I'm logged in/have a valid cookie.

I would have gone with appending the token to a url, but it seems that appending does not work when trying to access private directories.
0 Kudos