mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Daggerize XsrfTokenManager
The one-day validity period is also moved from the caller into XsrfTokenManager. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147857716
This commit is contained in:
@@ -52,6 +52,7 @@ class AppEngineConnection implements Connection {
|
||||
|
||||
@Inject HttpRequestFactory requestFactory;
|
||||
@Inject AppEngineConnectionFlags flags;
|
||||
@Inject XsrfTokenManager xsrfTokenManager;
|
||||
|
||||
@Inject
|
||||
AppEngineConnection() {}
|
||||
@@ -65,7 +66,7 @@ class AppEngineConnection implements Connection {
|
||||
memoize(new Supplier<String>() {
|
||||
@Override
|
||||
public String get() {
|
||||
return XsrfTokenManager.generateToken("admin", getUserId());
|
||||
return xsrfTokenManager.generateToken("admin", getUserId());
|
||||
}});
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,7 @@ import google.registry.keyring.api.KeyModule;
|
||||
import google.registry.request.Modules.DatastoreServiceModule;
|
||||
import google.registry.request.Modules.Jackson2Module;
|
||||
import google.registry.request.Modules.URLFetchServiceModule;
|
||||
import google.registry.request.Modules.UserServiceModule;
|
||||
import google.registry.util.SystemClock.SystemClockModule;
|
||||
import google.registry.util.SystemSleeper.SystemSleeperModule;
|
||||
import google.registry.whois.WhoisModule;
|
||||
@@ -54,6 +55,7 @@ import javax.inject.Singleton;
|
||||
SystemClockModule.class,
|
||||
SystemSleeperModule.class,
|
||||
URLFetchServiceModule.class,
|
||||
UserServiceModule.class,
|
||||
VoidDnsWriterModule.class,
|
||||
WhoisModule.class,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user