use of org.sagebionetworks.bridge.services.AppEmailType in project BridgeServer2 by Sage-Bionetworks.
the class AppController method resendVerifyEmail.
/**
* Resends the verification email for the current app's email.
*/
@PostMapping(path = { "/v1/apps/self/emails/resendVerify", "/v3/studies/self/emails/resendVerify" })
public StatusMessage resendVerifyEmail(@RequestParam(required = false) String type) {
UserSession session = getAuthenticatedSession(DEVELOPER);
AppEmailType parsedType = parseEmailType(type);
appService.sendVerifyEmail(session.getAppId(), parsedType);
return RESEND_EMAIL_MSG;
}
use of org.sagebionetworks.bridge.services.AppEmailType in project BridgeServer2 by Sage-Bionetworks.
the class AppController method verifyEmail.
/**
* Verifies the emails for the app. Since this comes in from an email with a token, you don't need to be
* authenticated. The token itself knows what app this is for.
*/
@PostMapping(path = { "/v1/apps/{appId}/emails/verify", "/v3/studies/{appId}/emails/verify" })
public StatusMessage verifyEmail(@PathVariable String appId, @RequestParam(required = false) String token, @RequestParam(required = false) String type) {
AppEmailType parsedType = parseEmailType(type);
appService.verifyEmail(appId, token, parsedType);
return CONSENT_EMAIL_VERIFIED_MSG;
}
Aggregations