/// <summary> /// Initializes a new instance of the <see cref="ApMaxController" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="oauth2AuthenticationSettings">The oauth2 authentication settings.</param> public TcpIpController(ILogger logger, Oauth2AuthenticationSettings oauth2AuthenticationSettings) { _name = Assembly.GetAssembly(GetType()).GetName().Name + " " + Assembly.GetAssembly(GetType()).GetName().Version; _logger = logger; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; }
public WcfAuthenticationManager() { _oauth2AuthenticationSettings = new Oauth2AuthenticationSettings { ClientId = ConfigurationManager.AppSettings["WebApiClientId"], ClientSecret = ConfigurationManager.AppSettings["WebApiClientSecert"], Url = ConfigurationManager.AppSettings["WebApiUrl"] }; }
public WcfAuthorizationManager() { id = Guid.NewGuid().ToString(); _oauth2AuthenticationSettings = new Oauth2AuthenticationSettings { ClientId = ConfigurationManager.AppSettings["WebApiClientId"], ClientSecret = ConfigurationManager.AppSettings["WebApiClientSecert"], Url = ConfigurationManager.AppSettings["WebApiUrl"] }; }
private void RetrieveWebApiTokenAndCreateCookie(Oauth2AuthenticationSettings oauth2AuthenticationSettings) { var accessTokenResponse = BearerTokenHelper.RetrieveNewBearToken(oauth2AuthenticationSettings); var cookie = new HttpCookie(AuthenticationConstants.AngularAuthToken) { Value = accessTokenResponse.AccessToken, Expires = accessTokenResponse.ExpiresOn }; Response.Cookies.Add(cookie); }
public static AuthenticationConfiguration Create(Oauth2AuthenticationSettings oauth2AuthenticationSettings, ILogger logger) { _logger = logger; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; var authentication = new AuthenticationConfiguration { ClaimsAuthenticationManager = new ProvisioningClaimsAuthenticationManager(GetClaimsForUser), RequireSsl = !AuthenticationConstants.AllowInsecureHttp, EnableSessionToken = true }; #region Basic Authentication authentication.AddBasicAuthentication(AuthenticateUser); #endregion return(authentication); }
/// <summary> /// Initializes a new instance of the <see cref="ApMaxController" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="oauth2AuthenticationSettings">The oauth2 authentication settings.</param> public MetaSphereController(ILogger logger, Oauth2AuthenticationSettings oauth2AuthenticationSettings) { _logger = logger; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; }
/// <summary> /// Initializes a new instance of the <see cref="ApMaxController" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="commonMapper">The mapper.</param> /// <param name="oauth2AuthenticationSettings">The oauth2 authentication settings.</param> public CalixController(ILogger logger, ICommonMapper commonMapper, Oauth2AuthenticationSettings oauth2AuthenticationSettings) { _commonMapper = commonMapper; _logger = logger; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; }
/// <summary> /// Initializes a new instance of the <see cref="AuthController"/> class. /// </summary> /// <param name="authService">The authentication service.</param> /// <param name="oauth2AuthenticationSettings">The oauth2 authentication settings.</param> public AuthController(AuthenticationService authService, Oauth2AuthenticationSettings oauth2AuthenticationSettings) { _userAccountService = authService.UserAccountService; _authService = authService; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; }
/// <summary> /// Retrieves the equipment connection settings. /// </summary> /// <param name="equipmentId">The equipment identifier.</param> /// <param name="authSettings">The authentication settings.</param> /// <returns></returns> public static ProvisioningEquipment RetrieveProvisioningEquipmentSettings(int equipmentId, Oauth2AuthenticationSettings authSettings) { var accessTokenResponse = BearerTokenHelper.RetrieveBearTokenFromCache(authSettings); return(GetEquipmentConnectionSettings(equipmentId, authSettings.Url, accessTokenResponse)); }
/// <summary> /// Initializes a new instance of the <see cref="ApMaxController" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="oauth2AuthenticationSettings">The oauth2 authentication settings.</param> public PannawayController(ILogger logger, Oauth2AuthenticationSettings oauth2AuthenticationSettings) { _logger = logger; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; }