Scope can be private

This commit is contained in:
Bruno Oliveira 2014-05-07 08:03:21 -03:00
parent 1ea1f0af96
commit 5973ccd522
5 changed files with 12 additions and 12 deletions

View file

@ -12,7 +12,9 @@ import java.util.concurrent.atomic.AtomicLong;
* @version $Revision: 1 $
*/
public class AbstractOAuthClient {
public static final String OAUTH_TOKEN_REQUEST_STATE = "OAuth_Token_Request_State";
private static final String OAUTH_TOKEN_REQUEST_STATE = "OAuth_Token_Request_State";
private final AtomicLong counter = new AtomicLong();
protected String clientId;
protected Map<String, String> credentials;
protected String authUrl;
@ -23,8 +25,6 @@ public class AbstractOAuthClient {
protected String stateCookiePath;
protected boolean isSecure;
protected boolean publicClient;
protected final AtomicLong counter = new AtomicLong();
protected String getStateCode() {
return counter.getAndIncrement() + "/" + UUID.randomUUID().toString();
}

View file

@ -15,7 +15,7 @@ import java.security.NoSuchAlgorithmException;
* @version $Revision: 1 $
*/
public class HMACProvider {
public static String getJavaAlgorithm(Algorithm alg) {
private static String getJavaAlgorithm(Algorithm alg) {
switch (alg) {
case HS256:
return "HMACSHA256";
@ -28,7 +28,7 @@ public class HMACProvider {
}
}
public static Mac getMAC(final Algorithm alg) {
private static Mac getMAC(final Algorithm alg) {
try {
return Mac.getInstance(getJavaAlgorithm(alg));

View file

@ -4,7 +4,7 @@ package org.keycloak.representations.idm;
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/
public class ErrorRepresentation {
public String errorMessage;
private String errorMessage;
public ErrorRepresentation() {
}

View file

@ -268,7 +268,7 @@ public class Encode
return buf.toString();
}
public static boolean savePathParams(String segment, StringBuffer newSegment, List<String> params)
private static boolean savePathParams(String segment, StringBuffer newSegment, List<String> params)
{
boolean foundParam = false;
// Regular expressions can have '{' and '}' characters. Replace them to do match
@ -293,7 +293,7 @@ public class Encode
* @param encoding
* @return
*/
public static String encodeValue(String segment, String[] encoding)
private static String encodeValue(String segment, String[] encoding)
{
ArrayList<String> params = new ArrayList<String>();
boolean foundParam = false;
@ -395,7 +395,7 @@ public class Encode
return encodeFromArray(nameOrValue, queryNameValueEncoding, true);
}
protected static String encodeFromArray(String segment, String[] encodingMap, boolean encodePercent)
private static String encodeFromArray(String segment, String[] encodingMap, boolean encodePercent)
{
StringBuffer result = new StringBuffer();
for (int i = 0; i < segment.length(); i++)
@ -445,7 +445,7 @@ public class Encode
return encoded;
}
public static String pathParamReplacement(String segment, List<String> params)
private static String pathParamReplacement(String segment, List<String> params)
{
StringBuffer newSegment = new StringBuffer();
Matcher matcher = PARAM_REPLACEMENT.matcher(segment);

View file

@ -55,8 +55,8 @@ public class KeycloakUriBuilder {
return impl;
}
public static final Pattern opaqueUri = Pattern.compile("^([^:/?#]+):([^/].*)");
public static final Pattern hierarchicalUri = Pattern.compile("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?");
private static final Pattern opaqueUri = Pattern.compile("^([^:/?#]+):([^/].*)");
private static final Pattern hierarchicalUri = Pattern.compile("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?");
private static final Pattern hostPortPattern = Pattern.compile("([^/:]+):(\\d+)");
public static boolean compare(String s1, String s2) {