public static string AuthorisationFlowPart2(string straccessToken, string appKey, string appSecret, string redirectUrl, string strCrossSiteScriptCheck) { try { redirectUrl = GetValidRedirectURL(redirectUrl); AuthorisationSettings authSettings = new AuthorisationSettings(appKey, appSecret, new Uri(redirectUrl), strCrossSiteScriptCheck); var authTask = AuthorizeApp.GetUserAuthorisationCode(straccessToken, authSettings); if (!authTask.IsCompleted) { authTask.Wait(); } if (authTask.Result != null) { return(authTask.Result.ToString()); } } catch (AggregateException ex) { foreach (Exception ie in ex.InnerExceptions) { throw; } } return(""); }
// AuthorisationFlowPart1 funtion returns string array: redirect url string placed in first element and other element is error message (if any). public static string[] AuthorisationFlowPart1(string appKey, string appSecret, string redirectUrl, string strCrossSiteScriptCheck) { redirectUrl = GetValidRedirectURL(redirectUrl); AuthorisationSettings authSettings = new AuthorisationSettings(appKey, appSecret, new Uri(redirectUrl), strCrossSiteScriptCheck); return(AuthorizeApp.GetAuthorisationURL(authSettings)); }
public LocalAuth(IOptions <AppSetting> appConfiguration , IHttpContextAccessor httpContextAccessor , AuthorizeApp app , LoginParse loginParse , ObjCacheProvider <UserAuthSession> objCacheProvider) { _appConfiguration = appConfiguration; _httpContextAccessor = httpContextAccessor; _app = app; _loginParse = loginParse; _objCacheProvider = objCacheProvider; }
public CheckController(AuthorizeApp app, ObjCacheProvider <UserAuthSession> objCacheProvider, LoginParse loginParse) { _app = app; _objCacheProvider = objCacheProvider; _loginParse = loginParse; }
public CheckController() { _app = AutofacExt.GetFromFac <AuthorizeApp>(); }
public TestAuthen() { app = AutofacExt.GetFromFac <AuthorizeApp>(); }
public CheckController(AuthorizeApp app, ObjCacheProvider <UserAuthSession> objCacheProvider, SSOAuthUtil ssoAuthUtil) { _app = app; _objCacheProvider = objCacheProvider; _ssoAuthUtil = ssoAuthUtil; }
public TestWorkflow() { _app = AutofacExt.GetFromFac <FlowSchemeApp>(); _runApp = AutofacExt.GetFromFac <FlowInstanceApp>(); authenApp = AutofacExt.GetFromFac <AuthorizeApp>(); }