/// <summary> /// Create an instance using the appropriate settings and service. /// </summary> /// <param name="settings">Framework settings.</param> /// <param name="sessionService">Service used for managing sessions.</param> public RegistrationService(IFrameworkSettings settings, ISessionService sessionService) { this.settings = settings; this.sessionService = sessionService; if (AuthenticationMethod.Basic.ToString().Equals(settings.AuthenticationMethod, StringComparison.OrdinalIgnoreCase)) { authorisationTokenService = new BasicAuthorisationTokenService(); } else if (AuthenticationMethod.SIF_HMACSHA256.ToString().Equals(settings.AuthenticationMethod, StringComparison.OrdinalIgnoreCase)) { authorisationTokenService = new HmacShaAuthorisationTokenService(); } else { authorisationTokenService = new BasicAuthorisationTokenService(); } Registered = false; }