public final class OAuthUtils extends Object
public static byte[] createCertificateThumbprint(X509Certificate cert) throws Exception
Exception
public static void setCertificateThumbprintConfirmation(MessageContext mc, X509Certificate cert)
public static boolean compareCertificateThumbprints(X509Certificate cert, String encodedThumbprint)
public static boolean compareTlsCertificates(TLSSessionInfo tlsInfo, List<String> base64EncodedCerts)
public static boolean isMutualTls(javax.ws.rs.core.SecurityContext sc, TLSSessionInfo tlsSessionInfo)
public static String getSubjectDnFromTLSCertificates(X509Certificate cert)
public static String getIssuerDnFromTLSCertificates(X509Certificate cert)
public static X509Certificate getRootTLSCertificate(TLSSessionInfo tlsInfo)
public static void injectContextIntoOAuthProvider(MessageContext context, Object provider)
public static String setSessionToken(MessageContext mc)
public static String setSessionToken(MessageContext mc, int maxInactiveInterval)
public static String setSessionToken(MessageContext mc, String sessionToken)
public static String setSessionToken(MessageContext mc, String sessionToken, int maxInactiveInterval)
public static String setSessionToken(MessageContext mc, String sessionToken, String attribute, int maxInactiveInterval)
public static String getSessionToken(MessageContext mc)
public static String getSessionToken(MessageContext mc, String attribute)
public static String getSessionToken(MessageContext mc, String attribute, boolean remove)
public static UserSubject createSubject(MessageContext mc, SecurityContext sc)
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 boolean validateAudience(String providedAudience, List<String> allowedAudiences)
public static boolean validateAudiences(List<String> providedAudiences, List<String> allowedAudiences)
public static List<String> getRequestedScopes(Client client, String scopeParameter, boolean useAllClientScopes, boolean partialMatchScopeValidation)
public static boolean validateScopes(List<String> requestScopes, List<String> registeredScopes, boolean partialMatchScopeValidation)
public static ClientAccessToken toClientAccessToken(ServerAccessToken serverToken, boolean supportOptionalParams)
public static JwsSignatureProvider getClientSecretSignatureProvider(String clientSecret)
public static JwsSignatureVerifier getClientSecretSignatureVerifier(String clientSecret)
public static JweDecryptionProvider getClientSecretDecryptionProvider(String clientSecret)
public static JweEncryptionProvider getClientSecretEncryptionProvider(String clientSecret)
public static SignatureAlgorithm getClientSecretSignatureAlgorithm(Properties sigProps)
Apache CXF