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()) |
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
public static ServletModule infusionsoftIdApplication(String... anonymousPaths) { | |
final String[] antPaths; | |
if (null == anonymousPaths) { | |
antPaths = new String[0]; | |
} else { | |
antPaths = anonymousPaths; | |
} | |
final InfusionsoftIdCasAuthenticator casAuthenticator = new InfusionsoftIdCasAuthenticator(); |
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
authBuilder | |
.verifiesClaimsBy( | |
c -> firebaseApplicationName.equals(c.getAudience()) | |
) | |
.verifiesClaimsBy( | |
c -> (ISSUER_PREFIX + firebaseApplicationName).equals(c.getIssuer()) | |
) | |
.verifiesClaimsBy( | |
c -> { | |
// we may not need this once we have our own signin provider proxied by Firebase |
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
PancakesAppSecurity.module() | |
.anonymousByDefault() | |
.authenticate("/profile", "/account") | |
.and() | |
.domainAuthentication() | |
.usingJsonWebTokens() | |
.usingFirebase(keyCache) | |
.forAppId("url-shortening-app") |
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
public Contact createContact(){ | |
Model.Builder<Contact> contactBuilder = new Model.Builder<Contact>() | |
.setFieldValue(Contact.Field.FirstName, "first name") | |
.setCustomFieldValue("FavoriteDessert", "lemon cake") | |
.setFieldValue(Contact.Field.LastName, "last name"); | |
return contactBuilder.build(); | |
} |
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
package com.infusionsoft.personalization; | |
/** | |
* This represents the valid date formats Infusionsoft will accept and render. | |
*/ | |
public class StyleGuide { | |
public enum Date { | |
ReadableDowMonthDdYear("formats.readable.dow-month-dd-year"), | |
ReadableMonthDdYear("formats.readable.month-dd-year"), | |
ReadableMonDdYearTime("formats.readable.mon-dd-year-time"), |
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
package com.infusionsoft.metrics.spring; | |
import com.infusion.crm.log.Log; | |
import com.infusion.util.data.filter.DataFilter; | |
import com.infusionsoft.util.AnnotationMethodFilter; | |
import org.aopalliance.intercept.MethodInvocation; | |
import org.springframework.core.annotation.AnnotationUtils; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:mvc="http://www.springframework.org/schema/mvc" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:aop="http://www.springframework.org/schema/aop" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/mvc |
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
package com.infusionsoft.metrics.aspect; | |
import com.infusion.util.ListFactory; | |
import com.infusionsoft.metrics.annotations.MetricsAware; | |
import org.springframework.aop.TargetSource; | |
import org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator; | |
import org.springframework.beans.BeansException; | |
import org.springframework.core.annotation.AnnotationUtils; | |
import org.springframework.stereotype.Component; | |
import org.springframework.stereotype.Controller; |
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
Do this: https://github.com/infusionsoft/pancakesw/blob/master/pankacesw |
NewerOlder