Last active
February 11, 2019 18:44
-
-
Save wendelicious/16b227d704b0bd87a760125f7806b89d to your computer and use it in GitHub Desktop.
Create Guice Injector using a Security Builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected Injector getInjector() { | |
return PancakesGuiceInjector.builder() | |
.addModule(new SuccessCenterApiModule()) | |
.addModule(new LocalSuccessCenterApiModule(), DeploymentEnvironment.DEV) | |
.addModule(new GoogleCloudSuccessCenterApiModule(), DeploymentEnvironment.excludingEnvironments(DeploymentEnvironment.DEV)) | |
.addModule(new SuccessCenterPolicyServletModule()) | |
.addModule( | |
PancakesSecurity.module() | |
.anonymous() | |
.path("/public", "/public/**", "/**/public/**") | |
.path("/info", "/info/**") | |
.and() | |
.domain() | |
.accountId("OAuth Account Id from Google Console") | |
.secret("OAutch Account secret from Google Console") | |
.and() | |
.infusionsoftId() | |
.neverEverInMillionsOfYears(ross) | |
.forgetIt(ross) | |
.build(servletContext) | |
) | |
.build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
also i think
is superfluous