org.apache.cxf.rs.security.oauth2.utils
Class OAuthUtils
java.lang.Object
org.apache.cxf.rs.security.oauth2.utils.OAuthUtils
public final class OAuthUtils
- extends Object
Various utility methods
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createSubject
public static UserSubject createSubject(SecurityContext securityContext)
convertPermissionsToScope
public static String convertPermissionsToScope(List<OAuthPermission> perms)
convertPermissionsToScopeList
public static List<String> convertPermissionsToScopeList(List<OAuthPermission> perms)
isGrantSupportedForClient
public static boolean isGrantSupportedForClient(Client client,
boolean canSupportPublicClients,
String grantType)
parseScope
public static List<String> parseScope(String requestedScope)
generateRandomTokenKey
public static String generateRandomTokenKey()
throws OAuthServiceException
- Throws:
OAuthServiceException
getIssuedAt
public static long getIssuedAt()
generateRandomTokenKey
public static String generateRandomTokenKey(String digestAlgo)
throws OAuthServiceException
- Throws:
OAuthServiceException
isExpired
public static boolean isExpired(Long issuedAt,
Long lifetime)
validateAudience
public static boolean validateAudience(String audience,
List<String> audiences)
checkRequestURI
public static boolean checkRequestURI(String servletPath,
String uri)
getRequestedScopes
public static List<String> getRequestedScopes(Client client,
String scopeParameter,
boolean partialMatchScopeValidation)
validateScopes
public static boolean validateScopes(List<String> requestScopes,
List<String> registeredScopes,
boolean partialMatchScopeValidation)
Apache CXF