Has the OAuthAuthorizeHandler implementation been removed from the Runtime Toolkit?

522
1
02-03-2020 09:47 AM
MikeQuetel1
Occasional Contributor

Esri's documentation indicates that an implementation of OAuthAuthorizeHandler is available in the toolkit (below). I'm having trouble locating it.  Has it been removed or am I being stupid?  Also, is there a canonical example of how to implement such an object?  I'm particularly interested in any nuances around handling token timeouts.  A number of the online samples show slightly different implementations.  For example these two help topic show some differences in the implementation:

ServerInfo Class 

and

IOAuthAuthorizeHandler Interface 

public Esri.ArcGISRuntime.Security.IOAuthAuthorizeHandler OAuthAuthorizeHandler { get; set; }
Member of Esri.ArcGISRuntime.Security.AuthenticationManager

Summary:
Gets or sets the component sets the component that handles authorization by a resource owner in an oauth workflow.

Remarks:
The ArcGISRuntime SDK doesn't provide any default OAuthAuthorizeHandler implementation but the ArcGIS Runtime Toolkit for .NET provides such a component.

This toolkit component can be set by code like: AuthenticationManager.Current.OAuthAuthorizeHandler = new Esri.ArcGISRuntime.Toolkit.Security.OAuthAuthorizeHandler();

Tags (2)
0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor

The doc is incorrect. There's a challenge handler in the preview package, but this one doesn't handle OAuth yet:

arcgis-toolkit-dotnet/ChallengeHandler.cs at master · Esri/arcgis-toolkit-dotnet · GitHub 

Instead see the sample app:

arcgis-runtime-samples-dotnet/OAuth.xaml.cs at a3aad07afa1a29fece692648e2337ed1c0de7118 · Esri/arcgi... 

0 Kudos