Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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;
 }