public InteractiveRequest(AuthenticationRequestParameters authenticationRequestParameters, string[] additionalScope, UiOptions uiOptions, IWebUI webUI) : this( authenticationRequestParameters, additionalScope, authenticationRequestParameters.User?.DisplayableId, uiOptions, webUI) { }
/// <summary> /// </summary> /// <param name="scope"></param> /// <param name="user"></param> /// <param name="options"></param> /// <param name="extraQueryParameters"></param> /// <param name="additionalScope"></param> /// <param name="authority"></param> /// <param name="policy"></param> /// <returns></returns> public async Task <AuthenticationResult> AcquireTokenAsync(string[] scope, User user, UiOptions options, string extraQueryParameters, string[] additionalScope, string authority, string policy) { Authority authorityInstance = Internal.Instance.Authority.CreateAuthority(authority, this.ValidateAuthority); return (await this.AcquireTokenCommonAsync(authorityInstance, scope, additionalScope, user, options, extraQueryParameters, policy).ConfigureAwait(false)); }
/// <summary> /// /// </summary> /// <param name="scope"></param> /// <param name="user"></param> /// <param name="options"></param> /// <param name="extraQueryParameters"></param> /// <param name="additionalScope"></param> /// <param name="authority"></param> /// <param name="policy"></param> /// <returns></returns> public async Task <AuthenticationResult> AcquireTokenAsync(string[] scope, User user, UiOptions options, string extraQueryParameters, string[] additionalScope, string authority, string policy) { Authenticator authenticator = new Authenticator(authority, this.ValidateAuthority, this.CorrelationId); return (await this.AcquireTokenCommonAsync(authenticator, scope, additionalScope, new Uri(this.RedirectUri), user, options, extraQueryParameters, policy).ConfigureAwait(false)); }
/// <summary> /// </summary> /// <param name="scope"></param> /// <param name="loginHint"></param> /// <param name="extraQueryParameters"></param> /// <param name="options"></param> /// <returns></returns> public async Task <AuthenticationResult> AcquireTokenAsync(string[] scope, string loginHint, UiOptions options, string extraQueryParameters) { Authority authority = Internal.Instance.Authority.CreateAuthority(this.Authority, this.ValidateAuthority); return (await this.AcquireTokenCommonAsync(authority, scope, null, loginHint, options, extraQueryParameters, null).ConfigureAwait(false)); }
/// <summary> /// /// </summary> /// <param name="scope"></param> /// <param name="loginHint"></param> /// <param name="extraQueryParameters"></param> /// <param name="options"></param> /// <returns></returns> public async Task <AuthenticationResult> AcquireTokenAsync(string[] scope, string loginHint, UiOptions options, string extraQueryParameters) { Authenticator authenticator = new Authenticator(this.Authority, this.ValidateAuthority, this.CorrelationId); return (await this.AcquireTokenCommonAsync(authenticator, scope, null, new Uri(this.RedirectUri), loginHint, options, extraQueryParameters, null).ConfigureAwait(false)); }
public static IServiceCollection AddUiOptions(this IServiceCollection services) { UiOptions uiOptions = new UiOptions(); uiOptions.DateFormat = "dd.MM.yyyy"; uiOptions.DateTimeFormat = "dd.MM.yyyy HH:mm:ss"; uiOptions.TextPreviewLength = 300; return(services.AddSingleton(uiOptions)); }
void Awake() { //Debug.Log("UiEndGamePanel"); if (inst == null) { inst = this; } else if (inst != null) { Destroy(gameObject); } EXIT.onClick.AddListener(() => show(false)); show(false); }
public InteractiveRequest(AuthenticationRequestParameters authenticationRequestParameters, string[] additionalScope, Uri redirectUri, IPlatformParameters parameters, string loginHint, UiOptions? uiOptions, string extraQueryParameters, IWebUI webUI) : base(authenticationRequestParameters) { this._redirectUri = PlatformPlugin.PlatformInformation.ValidateRedirectUri(redirectUri, this.CallState); if (!string.IsNullOrWhiteSpace(this._redirectUri.Fragment)) { throw new ArgumentException(MsalErrorMessage.RedirectUriContainsFragment, "redirectUri"); } _additionalScope = new HashSet<string>(); if (!MsalStringHelper.IsNullOrEmpty(additionalScope)) { this._additionalScope = additionalScope.CreateSetFromArray(); } ValidateScopeInput(this._additionalScope); this._authorizationParameters = parameters; this._redirectUriRequestParameter = PlatformPlugin.PlatformInformation.GetRedirectUriAsString(this._redirectUri, this.CallState); this._loginHint = loginHint; if (!string.IsNullOrWhiteSpace(extraQueryParameters) && extraQueryParameters[0] == '&') { extraQueryParameters = extraQueryParameters.Substring(1); } this._extraQueryParameters = extraQueryParameters; this._webUi = webUI; this._uiOptions = uiOptions; this.LoadFromCache = false; //no cache lookup and refresh for interactive. this.SupportADFS = false; if (string.IsNullOrWhiteSpace(loginHint) && _uiOptions == UiOptions.ActAsCurrentUser) { throw new ArgumentException(MsalErrorMessage.LoginHintNullForUiOption, "loginHint"); } PlatformPlugin.BrokerHelper.PlatformParameters = _authorizationParameters; }
public static IApplicationBuilder UseEazyLoggerUi(this IApplicationBuilder applicationBuilder, Action <UiOptions> options = null) { if (applicationBuilder == null) { throw new ArgumentNullException(nameof(applicationBuilder)); } var uiOptions = new UiOptions(); options?.Invoke(uiOptions); //var scope = applicationBuilder.ApplicationServices.CreateScope(); //var authOptions = scope.ServiceProvider.GetService<AuthorizationOptions>(); //uiOptions.AuthType = authOptions.AuthenticationType.ToString(); //scope.Dispose(); return(applicationBuilder.UseMiddleware <MiddlewareExtention>(uiOptions)); }
public virtual void AddUiOptionsQueryParameter(UiOptions options, DictionaryRequestParameters authorizationRequestParameters) { authorizationRequestParameters[OAuthParameter.Prompt] = PromptValue.Login; }
public static int RunUiAndReturnExitCode(UiOptions opts) { var ui = new Ui(); return(0); }
public InteractiveRequest(AuthenticationRequestParameters authenticationRequestParameters, string[] additionalScope, Uri redirectUri, IPlatformParameters parameters, User user, UiOptions uiOptions, string extraQueryParameters, IWebUI webUI) : this(authenticationRequestParameters, additionalScope, redirectUri, parameters, user?.DisplayableId, uiOptions, extraQueryParameters, webUI) { this.User = user; }
public AcquireTokenInteractiveHandler(HandlerData handlerData, string[] additionalScope, Uri redirectUri, IPlatformParameters parameters, User user, UiOptions uiOptions, string extraQueryParameters, IWebUI webUI) : this(handlerData, additionalScope, redirectUri, parameters, user?.DisplayableId, uiOptions, extraQueryParameters, webUI) { this.User = user; }
private async Task <AuthenticationResult> AcquireTokenCommonAsync(Authenticator authenticator, string[] scope, string[] additionalScope, Uri redirectUri, User user, UiOptions uiOptions, string extraQueryParameters, string policy) { if (this.PlatformParameters == null) { this.PlatformParameters = PlatformPlugin.DefaultPlatformParameters; } var handler = new AcquireTokenInteractiveHandler( this.GetHandlerData(authenticator, scope, policy, this.UserTokenCache), additionalScope, redirectUri, this.PlatformParameters, user, uiOptions, extraQueryParameters, this.CreateWebAuthenticationDialog(this.PlatformParameters)); return(await handler.RunAsync().ConfigureAwait(false)); }
public static void OnInitSuccess(Response successResponse) { UiOptions uiOptions = new UiOptions(); uiOptions.Name = "signin"; uiOptions.Element = "signin"; uiOptions.brand = "skydrive"; uiOptions.onloggedin = OnLogon; LiveApi.Ui(uiOptions); }
public Startup(IConfiguration configuration) { Configuration = configuration; _jwtBearerOptions = configuration.GetSection("JwtBearer").Get <JwtBearerOptions>(); _uiOptions = configuration.GetSection("UiOptions").Get <UiOptions>(); }
/// <summary> /// /// </summary> /// <param name="scope"></param> /// <param name="user"></param> /// <param name="options"></param> /// <param name="extraQueryParameters"></param> /// <param name="additionalScope"></param> /// <param name="authority"></param> /// <param name="policy"></param> /// <returns></returns> public async Task<AuthenticationResult> AcquireTokenAsync(string[] scope, User user, UiOptions options, string extraQueryParameters, string[] additionalScope, string authority, string policy) { Authenticator authenticator = new Authenticator(authority, this.ValidateAuthority, this.CorrelationId); return await this.AcquireTokenCommonAsync(authenticator, scope, additionalScope, new Uri(this.RedirectUri), user, options, extraQueryParameters, policy).ConfigureAwait(false); }
public InteractiveRequest(AuthenticationRequestParameters authenticationRequestParameters, string[] additionalScope, Uri redirectUri, IPlatformParameters parameters, User user, UiOptions uiOptions, string extraQueryParameters, IWebUI webUI) :this(authenticationRequestParameters, additionalScope, redirectUri, parameters, user?.DisplayableId, uiOptions, extraQueryParameters, webUI) { this.User = user; }
private async Task <AuthenticationResult> AcquireTokenCommonAsync(Authority authority, string[] scope, string[] additionalScope, User user, UiOptions uiOptions, string extraQueryParameters, string policy) { var requestParams = this.CreateRequestParameters(authority, scope, policy, user, this.UserTokenCache); requestParams.ExtraQueryParameters = extraQueryParameters; var handler = new InteractiveRequest(requestParams, additionalScope, uiOptions, this.CreateWebAuthenticationDialog(this.PlatformParameters)); return(await handler.RunAsync().ConfigureAwait(false)); }
/// <summary> /// /// </summary> /// <param name="scope"></param> /// <param name="loginHint"></param> /// <param name="extraQueryParameters"></param> /// <param name="options"></param> /// <returns></returns> public async Task<AuthenticationResult> AcquireTokenAsync(string[] scope, string loginHint, UiOptions options, string extraQueryParameters) { Authenticator authenticator = new Authenticator(this.Authority, this.ValidateAuthority, this.CorrelationId); return await this.AcquireTokenCommonAsync(authenticator, scope, null, new Uri(this.RedirectUri), loginHint, options, extraQueryParameters, null).ConfigureAwait(false); }
private async Task<AuthenticationResult> AcquireTokenCommonAsync(Authenticator authenticator, string[] scope, string[] additionalScope, Uri redirectUri, User user, UiOptions uiOptions, string extraQueryParameters, string policy) { if (this.PlatformParameters == null) { this.PlatformParameters = PlatformPlugin.DefaultPlatformParameters; } var handler = new InteractiveRequest( this.GetHandlerData(authenticator, scope, policy, this.UserTokenCache), additionalScope, redirectUri, this.PlatformParameters, user, uiOptions, extraQueryParameters, this.CreateWebAuthenticationDialog(this.PlatformParameters)); return await handler.RunAsync().ConfigureAwait(false); }