mirror of
https://github.com/google/nomulus
synced 2026-01-09 07:33:42 +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:
@@ -58,6 +58,7 @@ public final class ConsoleUiAction implements Runnable {
|
||||
@Inject Response response;
|
||||
@Inject SessionUtils sessionUtils;
|
||||
@Inject UserService userService;
|
||||
@Inject XsrfTokenManager xsrfTokenManager;
|
||||
@Inject @Config("logoFilename") String logoFilename;
|
||||
@Inject @Config("productName") String productName;
|
||||
@Inject @Config("integrationEmail") String integrationEmail;
|
||||
@@ -104,7 +105,7 @@ public final class ConsoleUiAction implements Runnable {
|
||||
return;
|
||||
}
|
||||
Registrar registrar = Registrar.loadByClientId(sessionUtils.getRegistrarClientId(req));
|
||||
data.put("xsrfToken", XsrfTokenManager.generateToken(EppConsoleAction.XSRF_SCOPE));
|
||||
data.put("xsrfToken", xsrfTokenManager.generateToken(EppConsoleAction.XSRF_SCOPE));
|
||||
data.put("clientId", registrar.getClientId());
|
||||
data.put("showPaymentLink", registrar.getBillingMethod() == Registrar.BillingMethod.BRAINTREE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user