|
Sep 2 2008, 6:01 PM EDT
|
|
|
edit |
5 words added
1 word deleted
|
|
Change: + developerKey + "\" type=\"text/javascript\"></script>\r" + "\t<script type=\'text/javascript\'>\r" + "\t\tif( window.WPCAPI ) {\r" + "\t\t\tWPCAPI.setLoginTicket('" + ticket + "');\r" + "\t\t\tWPCAPI.setDeveloperKey('" + developerKey + "');\r" + "\t\t\tWPCAPI.setNamespace('" + contentNamespace + "');\r" + "\t\t}\r" + "\t</script>\r"; return script; }//Insert getters and setters for properties } Here's an example
View changes from previous version.
(Word count: 624)
|
|
May 15 2008, 12:59 PM EDT
|
|
|
edit |
6 words added
2 words deleted
|
|
Change: sigString.getBytes( "UTF-8" ) );sigHashString = new String( Hex.encodeHex( hash ) );} catch ( NoSuchAlgorithmException e ) {//throw custom exception} catch ( InvalidKeyException e ) {//throw custom exception} StringBuilder sbUrl = new StringBuilder(); sbUrl.append( serverUrl ) .append( "/UserService/login.do" ); StringBuilder sbData = new StringBuilder();
View changes from previous version.
(Word count: 623)
|
|
May 14 2008, 2:33 PM EDT
|
|
|
edit |
1 word added
1 word deleted
|
|
Change: "http://togo.wetpaint.com/CellService/""http://wapi.wetpaint.com/CellService/" + "getCell.do?key=" + developerKey + "&ns=" + contentNamespace + "&cell.cellId=" + cellId; // Send data URL url = new URL( urlString ); URLConnection conn = url.openConnection(); conn.setDoOutput( false ); // Get the response BufferedReader rd = new BufferedReader( new InputStreamReader( conn.getInputStream() ) ); String line; while
View changes from previous version.
(Word count: 619)
|
|
May 14 2008, 1:44 AM EDT
|
|
|
revert |
57 words added
39 words deleted
|
|
Change: republished the May 13 2008, 4:17 PM EDT version by May 14 2008, 1:44 AM EDT
|
|
May 13 2008, 6:01 PM EDT
|
|
|
revert |
39 words added
57 words deleted
|
|
Change: republished the May 2 2008, 2:11 PM EDT version by May 13 2008, 6:01 PM EDT
|
|
May 13 2008, 4:17 PM EDT
|
|
|
edit |
6 words added
21 words deleted
|
|
Change: throw new ConfigurationException( "Could not initialize the MAC algorithm",//throw ecustom );exception } StringBuilder sbUrl = new StringBuilder(); sbUrl.append( serverUrl ) .append( "/UserService/login.do" ); StringBuilder sbData = new StringBuilder(); sbData.append("key=" ) .append( command.getKey() ) .append( "&ns=" ) .append( command.getNs() ) .append( "&cred.ts=" ) .append( ts ) .append(
View changes from previous version.
(Word count: 619)
|
|
May 13 2008, 4:13 PM EDT
|
|
|
edit |
72 words added
39 words deleted
|
|
Change: throw new ConfigurationException( "Could not find SHA1 algorithm", e ); } catch ( InvalidKeyException e ) { throw new ConfigurationException( "Could not initialize the MAC algorithm", e ); } StringBuilder sbUrl = new StringBuilder(); sbUrl.append( serverUrl ) .append( "/UserService/login.do" ); StringBuilder sbData = new StringBuilder(); sbData.append("key=" ) .append( command.getKey() )
View changes from previous version.
(Word count: 632)
|
|
May 2 2008, 2:11 PM EDT
|
|
|
edit |
8 words added
|
|
Change: e ) { // noop } return ticket; } private static String hashSha1Hex( String string ) throws NoSuchAlgorithmException { MessageDigest messageDigest = MessageDigest.getInstance( "SHA-1" ); byte[] digest = messageDigest.digest( string.getBytes() ); return new String( Hex.encodeHex( digest ) ); } Data for testing login is available here.
View changes from previous version.
(Word count: 607)
|
|
May 2 2008, 2:07 PM EDT
|
|
|
edit |
1 word added
1 word deleted
|
|
Change: "http://togo.wetpaint.com/WikiService/""http://togo.wetpaint.com/CellService/" + "getCell.do?key=" + developerKey + "&ns=" + contentNamespace + "&cell.cellId=" + cellId; // Send data URL url = new URL( urlString ); URLConnection conn = url.openConnection(); conn.setDoOutput( false ); // Get the response BufferedReader rd = new BufferedReader( new InputStreamReader( conn.getInputStream() ) ); String line; while
View changes from previous version.
(Word count: 600)
|
|
Apr 30 2008, 1:53 PM EDT
|
|
|
edit |
13 words added
|
|
Change: Here's an example of the logic needed to call login written in Java:private static String getTicket( String serverUrl, PartnerCommand command ){ String ticket = null; StringBuilder htmlBuilder = new StringBuilder(); try { long ts = Calendar.getInstance().getTime().getTime() / 1000L; String sigString = "key=" +
View changes from previous version.
(Word count: 600)
|
|
Apr 30 2008, 1:53 PM EDT
|
|
|
edit |
213 words added
|
|
Change: String sigString = "key=" + command.getKey() + "&ts=" + ts + "secret"; String sigHashString = hashSha1Hex( sigString ); StringBuilder sbUrl = new StringBuilder(); sbUrl.append( serverUrl ) .append( "/UserService/login.do" ); StringBuilder sbData = new StringBuilder(); sbData.append("key=" ) .append( command.getKey() ) .append( "&ns=" ) .append( command.getNs() ) .append( "&cred.ts=" ) .append(
View changes from previous version.
(Word count: 586)
|
|
Apr 18 2008, 4:52 PM EDT
|
|
|
edit |
|
|
Change: There were only format changes (bold, italics, etc.) in this version. See this version for details.
(Word count: 398)
|
|
Apr 18 2008, 4:39 PM EDT
|
|
|
edit |
|
|
Change: There were only format changes (bold, italics, etc.) in this version. See this version for details.
(Word count: 398)
|
|
Apr 18 2008, 3:42 PM EDT
|
|
|
edit |
|
|
Change: There were only format changes (bold, italics, etc.) in this version. See this version for details.
(Word count: 398)
|
|
Apr 18 2008, 1:48 PM EDT
|
|
|
rename |
No content added or deleted. |
|
Change: Renamed from JSP-Sample Application by Apr 18 2008, 1:48 PM EDT for: Rename
|
|
Apr 18 2008, 1:42 PM EDT
|
|
|
move |
No content added or deleted. |
|
Change: Moved by Apr 18 2008, 1:42 PM EDT
|
|
Apr 11 2008, 2:34 PM EDT
|
|
|
edit |
2 words added
1 word deleted
|
|
Change: servlet/controller layer.This is what user generated content tag looks like: import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.net.URL;import java.net.URLConnection;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport;public class UserGenContentTag extends TagSupport { private String developerKey; private String contentNamespace; private String cellId; public UserGenContentTag(){} public int doStartTag() throws JspException { return super.doStartTag();
View changes from previous version.
(Word count: 398)
|
|
Apr 11 2008, 12:28 PM EDT
|
|
|
edit |
10 words deleted
|
|
Change: import java.io.InputStreamReader;import java.net.URL;import java.net.URLConnection;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport; import com.wetpaint.util.format.FormatterFactory;public class ClientApplicationTag extends TagSupport { private String developerKey; private String contentNamespace; private String ticket; private String wetpaintApiHost; public ClientApplicationTag(){} public int doStartTag() throws JspException { return super.doStartTag(); } public int doEndTag() throws JspException { try {
View changes from previous version.
(Word count: 396)
|
|
Apr 11 2008, 12:18 PM EDT
|
|
|
edit |
2 words deleted
|
|
Change: import com.wetpaint.util.format.FormatterFactory;public class UserGenContentTag extends TagSupport { private String developerKey; private String contentNamespace; private String cellId; public UserGenContentTag(){} public int doStartTag() throws JspException { return super.doStartTag(); } public int doEndTag() throws JspException { try { super.pageContext.getOut().write( getContent() ); } catch (IOException e) { //log exception} return super.doEndTag(); }
View changes from previous version.
(Word count: 418)
|
|
Apr 11 2008, 4:26 AM EDT
|
|
|
edit |
7 words added
65 words deleted
|
|
Change: public void setDeveloperKey(String developerKey) { this.developerKey = developerKey; } public String getContentNamespace() { return contentNamespace; } public void setContentNamespace(String contentNamespace) { this.contentNamespace = contentNamespace; } public String getTicket() { return ticket; } public void setTicket(String ticket) { this.ticket = ticket; } public String getWetpaintApiHost() { return wetpaintApiHost; } public void
View changes from previous version.
(Word count: 424)
|