You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oltu.apache.org by si...@apache.org on 2013/05/09 10:37:10 UTC
svn commit: r1480565 -
/oltu/trunk/oauth-2.0/jwt/src/main/java/org/apache/oltu/oauth2/jwt/JWTUtil.java
Author: simonetripodi
Date: Thu May 9 08:37:10 2013
New Revision: 1480565
URL: http://svn.apache.org/r1480565
Log:
code format: no tabs, dropped trailing spaces, dropped empty lines
Modified:
oltu/trunk/oauth-2.0/jwt/src/main/java/org/apache/oltu/oauth2/jwt/JWTUtil.java
Modified: oltu/trunk/oauth-2.0/jwt/src/main/java/org/apache/oltu/oauth2/jwt/JWTUtil.java
URL: http://svn.apache.org/viewvc/oltu/trunk/oauth-2.0/jwt/src/main/java/org/apache/oltu/oauth2/jwt/JWTUtil.java?rev=1480565&r1=1480564&r2=1480565&view=diff
==============================================================================
--- oltu/trunk/oauth-2.0/jwt/src/main/java/org/apache/oltu/oauth2/jwt/JWTUtil.java (original)
+++ oltu/trunk/oauth-2.0/jwt/src/main/java/org/apache/oltu/oauth2/jwt/JWTUtil.java Thu May 9 08:37:10 2013
@@ -24,33 +24,31 @@ import org.apache.commons.codec.binary.B
* processing.
*
*/
-public class JWTUtil {
-
-
-
- /**
- * Get the Header as defined in the 6.1 section of the JWT
- * specification (http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06#section-6.1)
- *
- * @param base64jsonString
- * @return the decoded JWT header
- */
- public static String getHeader(String base64jsonString){
- return decodeJSON(base64jsonString.split("\\.")[0]);
- }
-
- /**
- * Get the Claims Set as defined in the 6.1 section of the JWT
- * specification (http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06#section-6.1)
- *
- * @param base64jsonString
- * @return the decoded JWT claim set
- */
- public static String getClaimsSet(String base64jsonString){
- return decodeJSON(base64jsonString.split("\\.")[1]);
- }
-
- private static String decodeJSON(String base64jsonString){
- return new String(new Base64(true).decode(base64jsonString),Charset.forName("UTF-8"));
- }
+public class JWTUtil {
+
+ /**
+ * Get the Header as defined in the 6.1 section of the JWT
+ * specification (http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06#section-6.1)
+ *
+ * @param base64jsonString
+ * @return the decoded JWT header
+ */
+ public static String getHeader(String base64jsonString){
+ return decodeJSON(base64jsonString.split("\\.")[0]);
+ }
+
+ /**
+ * Get the Claims Set as defined in the 6.1 section of the JWT
+ * specification (http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06#section-6.1)
+ *
+ * @param base64jsonString
+ * @return the decoded JWT claim set
+ */
+ public static String getClaimsSet(String base64jsonString){
+ return decodeJSON(base64jsonString.split("\\.")[1]);
+ }
+
+ private static String decodeJSON(String base64jsonString){
+ return new String(new Base64(true).decode(base64jsonString),Charset.forName("UTF-8"));
+ }
}