This file contains hidden or 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
| <UserSignUp executor="com.wso2.custom.workflow.CustomUserSignUpWSWorkflowExecutor"> | |
| <property name="serviceEndpoint">http://localhost:9765/services/UserSignupProcess/</property> | |
| <property name="username">admin</property> | |
| <property name="password">admin</property> | |
| <property name="callbackURL">https://localhost:8243/services/WorkflowCallbackService</property> | |
| <property name="emailAddress">senders_email_address_here</property> | |
| <property name="emailPassword">senders_email_password_here</property> | |
| </UserSignUp> |
This file contains hidden or 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
| private String getUserEmail(WorkflowDTO workflowDTO) throws WorkflowException { | |
| PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); | |
| ctx.setUsername(workflowDTO.getWorkflowReference()); | |
| RealmService realmService = (RealmService) ctx.getOSGiService(RealmService.class, null); | |
| if (realmService == null) { | |
| String msg = "RealmService is not initialized"; | |
| log.error(msg); | |
| throw new WorkflowException(msg); | |
| } | |
| String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(workflowDTO.getWorkflowReference()); |
This file contains hidden or 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 | |
| public WorkflowResponse complete(WorkflowDTO workflowDTO) throws WorkflowException { | |
| super.complete(workflowDTO); | |
| Properties props = new Properties(); | |
| props.put(MAIL_SMTP_AUTH, "true"); | |
| props.put(MAIL_SMTP_STAR_TTLS_ENABLE, "true"); | |
| props.put(MAIL_SMTP_HOST, "smtp.gmail.com"); | |
| props.put(MAIL_SMTP_PORT, "587"); | |
| Session session = Session.getInstance(props, new javax.mail.Authenticator() { |