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
//user profile | |
namaste_user.profile = function(data, callback) { | |
console.log('sending user details....'); | |
namaste_user.find({ | |
where: { | |
mobile: data.mobile | |
} | |
}, function(err, mobileResult) { | |
if (err) { | |
callback(err, null); |
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.smc.utils; | |
import java.util.List; | |
import com.fasterxml.jackson.annotation.JsonProperty; | |
public class ResponseModel { |
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.smc.utils; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.security.Key; | |
import java.security.KeyStore; | |
import java.util.Base64; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; |
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.smc.utils; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; | |
import org.hibernate.cfg.Configuration; | |
import org.hibernate.service.ServiceRegistry; | |
import com.smc.model.UserModel; | |
public class HibernateUtil { |
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.smc.utils; | |
public class Constants { | |
public static final String SUCCESS = "SUCCESS"; | |
public static final String FAILURE = "FAILURE"; | |
public static final String USER_ID = "USER_ID"; | |
public static final String USER_NAME = "USER_NAME"; | |
public static final String USER_MESSAGE = "USER_MESSAGE"; | |
} |
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.smc.model; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
import com.fasterxml.jackson.annotation.JsonProperty; |
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.smc.dao; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.hibernate.Session; | |
import com.smc.model.UserModel; | |
import com.smc.utils.Constants; | |
import com.smc.utils.HibernateUtil; |
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.smc.webservice; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.ws.rs.Consumes; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.HeaderParam; | |
import javax.ws.rs.POST; | |
import javax.ws.rs.Path; |
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'?> | |
<!DOCTYPE hibernate-configuration PUBLIC | |
"//Hibernate/Hibernate Configuration DTD 4.0//EN" | |
"http://hibernate.sourceforge.net/hibernate-configuration-4.0.dtd"> | |
<hibernate-configuration xmlns="http://www.hibernate.org/xsd/orm/cfg" | |
xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-configuration hibernate-configuration-4.0.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<session-factory> |
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
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" | |
pageEncoding="ISO-8859-1"%> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>RestJWT</title> | |
</head> | |
<h2> | |
<b>Rest API oooooooooooOOOOOOOOOOOO</b> |