public static void SetAuthenticationContinuationEventArgs(int requestCode, Result resultCode, Intent data)
        {
            // TODO(migration): how can a public static method get access to the proper ClientRequestBase to wire into the logger and appropriate requestcontext?
            // Can we move this call to be somewhere on the ClientApplicationBase or something else that's wired into that?
            RequestContext requestContext = new RequestContext(null, AuthLogger.Create(null));

            requestContext.Logger.Info(string.Format(CultureInfo.InvariantCulture, "Received Activity Result({0})", (int)resultCode));
            AuthorizationResult authorizationResult = null;

            int code = (int)resultCode;

            if (data.Action != null && data.Action.Equals("ReturnFromEmbeddedWebview", StringComparison.OrdinalIgnoreCase))
            {
                authorizationResult = ProcessFromEmbeddedWebview(requestCode, resultCode, data);
            }
            else
            {
                authorizationResult = ProcessFromSystemWebview(requestCode, resultCode, data);
            }

            WebviewBase.SetAuthorizationResult(authorizationResult, requestContext);
        }
Exemple #2
0
 private RequestContext CreateRequestContext()
 {
     return(new RequestContext(AppConfig.ClientId, AuthLogger.Create(ServiceBundle.Config)));
 }