public final class OAuthUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
checkRequestURI(String servletPath,
String uri) |
static String |
convertPermissionsToScope(List<OAuthPermission> perms) |
static List<String> |
convertPermissionsToScopeList(List<OAuthPermission> perms) |
static UserSubject |
createSubject(SecurityContext securityContext) |
static String |
generateRandomTokenKey() |
static String |
generateRandomTokenKey(int byteSize) |
static String |
getDefaultSessionToken(MessageContext mc) |
static long |
getIssuedAt() |
static List<String> |
getRequestedScopes(Client client,
String scopeParameter,
boolean partialMatchScopeValidation) |
static boolean |
isExpired(Long issuedAt,
Long lifetime) |
static boolean |
isGrantSupportedForClient(Client client,
boolean canSupportPublicClients,
String grantType) |
static List<String> |
parseScope(String requestedScope) |
static String |
setDefaultSessionToken(MessageContext mc) |
static String |
setDefaultSessionToken(MessageContext mc,
int maxInactiveInterval) |
static String |
setDefaultSessionToken(MessageContext mc,
String sessionToken) |
static String |
setDefaultSessionToken(MessageContext mc,
String sessionToken,
int maxInactiveInterval) |
static ClientAccessToken |
toClientAccessToken(ServerAccessToken serverToken,
boolean supportOptionalParams) |
static boolean |
validateAudience(String audience,
List<String> audiences) |
static boolean |
validateScopes(List<String> requestScopes,
List<String> registeredScopes,
boolean partialMatchScopeValidation) |
public static String setDefaultSessionToken(MessageContext mc)
public static String setDefaultSessionToken(MessageContext mc, int maxInactiveInterval)
public static String setDefaultSessionToken(MessageContext mc, String sessionToken)
public static String setDefaultSessionToken(MessageContext mc, String sessionToken, int maxInactiveInterval)
public static String getDefaultSessionToken(MessageContext mc)
public static UserSubject createSubject(SecurityContext securityContext)
public static String convertPermissionsToScope(List<OAuthPermission> perms)
public static List<String> convertPermissionsToScopeList(List<OAuthPermission> perms)
public static boolean isGrantSupportedForClient(Client client, boolean canSupportPublicClients, String grantType)
public static String generateRandomTokenKey() throws OAuthServiceException
OAuthServiceException
public static String generateRandomTokenKey(int byteSize)
public static long getIssuedAt()
public static List<String> getRequestedScopes(Client client, String scopeParameter, boolean partialMatchScopeValidation)
public static boolean validateScopes(List<String> requestScopes, List<String> registeredScopes, boolean partialMatchScopeValidation)
public static ClientAccessToken toClientAccessToken(ServerAccessToken serverToken, boolean supportOptionalParams)
Apache CXF