SEC-1595: Added extra constructor to OpenID4JavaConsumer which takes a ConsumerManager to allow a version compatible with GAE to be injected.

This commit is contained in:
Luke Taylor 2010-11-02 20:18:22 +00:00
parent 337477de6a
commit 265cdaf2a6

View File

@ -57,8 +57,7 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================
public OpenID4JavaConsumer() throws ConsumerException { public OpenID4JavaConsumer() throws ConsumerException {
this.consumerManager = new ConsumerManager(); this(new ConsumerManager(), new NullAxFetchListFactory());
this.attributesToFetchFactory = new NullAxFetchListFactory();
} }
/** /**
@ -83,7 +82,12 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
} }
public OpenID4JavaConsumer(AxFetchListFactory attributesToFetchFactory) throws ConsumerException { public OpenID4JavaConsumer(AxFetchListFactory attributesToFetchFactory) throws ConsumerException {
this.consumerManager = new ConsumerManager(); this(new ConsumerManager(), attributesToFetchFactory);
}
public OpenID4JavaConsumer(ConsumerManager consumerManager, AxFetchListFactory attributesToFetchFactory)
throws ConsumerException {
this.consumerManager = consumerManager;
this.attributesToFetchFactory = attributesToFetchFactory; this.attributesToFetchFactory = attributesToFetchFactory;
} }