public static RequestInterceptor Create(string realm, IMembershipProvider membershipProvider) { var basicAuthenticationCredentialsExtractor = new BasicAuthenticationCredentialsExtractor(new Base64Decoder(), new DecodedCredentialsExtractor()); var httpRequestAuthorizationExtractor = new AuthorizationStringExtractor(); var responseMessageFactory = new ResponseMessageFactory(realm); var serviceSecurityContextFactory = new ServiceSecurityContextFactory(new AuthorizationPolicyFactory()); var basicAuthenticationManager = new BasicAuthenticationManager(basicAuthenticationCredentialsExtractor, httpRequestAuthorizationExtractor, membershipProvider, responseMessageFactory, serviceSecurityContextFactory); return new BasicAuthenticationInterceptor(basicAuthenticationManager); }
internal BasicAuthenticationManager(BasicAuthenticationCredentialsExtractor basicAuthenticationCredentialsExtractor, AuthorizationStringExtractor httpRequestAuthorizationExtractor, IMembershipProvider membershipProvider, ResponseMessageFactory responseMessageFactory, ServiceSecurityContextFactory serviceSecurityContextFactory) { this.basicAuthenticationCredentialsExtractor = basicAuthenticationCredentialsExtractor; this.httpRequestAuthorizationExtractor = httpRequestAuthorizationExtractor; this.membershipProvider = membershipProvider; this.responseMessageFactory = responseMessageFactory; this.serviceSecurityContextFactory = serviceSecurityContextFactory; }