org.apache.cxf.rs.security.oauth2.utils.crypto
Class ModelEncryptionSupport

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.utils.crypto.ModelEncryptionSupport

public final class ModelEncryptionSupport
extends Object

Default Model Encryption helpers


Method Summary
static ServerAccessToken decryptAccessToken(OAuthDataProvider provider, String encodedToken, Key secretKey)
           
static ServerAccessToken decryptAccessToken(OAuthDataProvider provider, String encodedData, Key secretKey, KeyProperties props)
           
static ServerAccessToken decryptAccessToken(OAuthDataProvider provider, String encodedToken, String encodedSecretKey)
           
static ServerAccessToken decryptAccessToken(OAuthDataProvider provider, String encodedToken, String encodedSecretKey, KeyProperties props)
           
static Client decryptClient(String encodedSequence, Key secretKey)
           
static Client decryptClient(String encodedData, Key secretKey, KeyProperties props)
           
static Client decryptClient(String encodedSequence, String encodedSecretKey)
           
static Client decryptClient(String encodedSequence, String encodedSecretKey, KeyProperties props)
           
static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider, String encodedToken, Key key)
           
static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider, String encodedData, Key key, KeyProperties props)
           
static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider, String encodedToken, String encodedSecretKey)
           
static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider, String encodedToken, String encodedSecretKey, KeyProperties props)
           
static RefreshToken decryptRefreshToken(OAuthDataProvider provider, String encodedToken, Key key)
           
static RefreshToken decryptRefreshToken(OAuthDataProvider provider, String encodedData, Key key, KeyProperties props)
           
static RefreshToken decryptRefreshToken(OAuthDataProvider provider, String encodedToken, String encodedSecretKey)
           
static RefreshToken decryptRefreshToken(OAuthDataProvider provider, String encodedToken, String encodedSecretKey, KeyProperties props)
           
static String encryptAccessToken(ServerAccessToken token, Key secretKey)
           
static String encryptAccessToken(ServerAccessToken token, Key secretKey, KeyProperties props)
           
static String encryptClient(Client client, Key secretKey)
           
static String encryptClient(Client client, Key secretKey, KeyProperties props)
           
static String encryptCodeGrant(ServerAuthorizationCodeGrant grant, Key secretKey)
           
static String encryptCodeGrant(ServerAuthorizationCodeGrant grant, Key secretKey, KeyProperties props)
           
static String encryptRefreshToken(RefreshToken token, Key secretKey)
           
static String encryptRefreshToken(RefreshToken token, Key secretKey, KeyProperties props)
           
static ServerAccessToken recreateAccessToken(OAuthDataProvider provider, String newTokenKey, String decryptedSequence)
           
static Client recreateClient(String sequence)
           
static ServerAuthorizationCodeGrant recreateCodeGrant(OAuthDataProvider provider, String decryptedSequence)
           
static RefreshToken recreateRefreshToken(OAuthDataProvider provider, String newTokenKey, String decryptedSequence)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encryptClient

public static String encryptClient(Client client,
                                   Key secretKey)
                            throws SecurityException
Throws:
SecurityException

encryptClient

public static String encryptClient(Client client,
                                   Key secretKey,
                                   KeyProperties props)
                            throws SecurityException
Throws:
SecurityException

encryptAccessToken

public static String encryptAccessToken(ServerAccessToken token,
                                        Key secretKey)
                                 throws SecurityException
Throws:
SecurityException

encryptAccessToken

public static String encryptAccessToken(ServerAccessToken token,
                                        Key secretKey,
                                        KeyProperties props)
                                 throws SecurityException
Throws:
SecurityException

encryptRefreshToken

public static String encryptRefreshToken(RefreshToken token,
                                         Key secretKey)
                                  throws SecurityException
Throws:
SecurityException

encryptRefreshToken

public static String encryptRefreshToken(RefreshToken token,
                                         Key secretKey,
                                         KeyProperties props)
                                  throws SecurityException
Throws:
SecurityException

encryptCodeGrant

public static String encryptCodeGrant(ServerAuthorizationCodeGrant grant,
                                      Key secretKey)
                               throws SecurityException
Throws:
SecurityException

encryptCodeGrant

public static String encryptCodeGrant(ServerAuthorizationCodeGrant grant,
                                      Key secretKey,
                                      KeyProperties props)
                               throws SecurityException
Throws:
SecurityException

decryptClient

public static Client decryptClient(String encodedSequence,
                                   String encodedSecretKey)
                            throws SecurityException
Throws:
SecurityException

decryptClient

public static Client decryptClient(String encodedSequence,
                                   String encodedSecretKey,
                                   KeyProperties props)
                            throws SecurityException
Throws:
SecurityException

decryptClient

public static Client decryptClient(String encodedSequence,
                                   Key secretKey)
                            throws SecurityException
Throws:
SecurityException

decryptClient

public static Client decryptClient(String encodedData,
                                   Key secretKey,
                                   KeyProperties props)
                            throws SecurityException
Throws:
SecurityException

decryptAccessToken

public static ServerAccessToken decryptAccessToken(OAuthDataProvider provider,
                                                   String encodedToken,
                                                   String encodedSecretKey)
                                            throws SecurityException
Throws:
SecurityException

decryptAccessToken

public static ServerAccessToken decryptAccessToken(OAuthDataProvider provider,
                                                   String encodedToken,
                                                   String encodedSecretKey,
                                                   KeyProperties props)
                                            throws SecurityException
Throws:
SecurityException

decryptAccessToken

public static ServerAccessToken decryptAccessToken(OAuthDataProvider provider,
                                                   String encodedToken,
                                                   Key secretKey)
                                            throws SecurityException
Throws:
SecurityException

decryptAccessToken

public static ServerAccessToken decryptAccessToken(OAuthDataProvider provider,
                                                   String encodedData,
                                                   Key secretKey,
                                                   KeyProperties props)
                                            throws SecurityException
Throws:
SecurityException

decryptRefreshToken

public static RefreshToken decryptRefreshToken(OAuthDataProvider provider,
                                               String encodedToken,
                                               String encodedSecretKey)
                                        throws SecurityException
Throws:
SecurityException

decryptRefreshToken

public static RefreshToken decryptRefreshToken(OAuthDataProvider provider,
                                               String encodedToken,
                                               String encodedSecretKey,
                                               KeyProperties props)
                                        throws SecurityException
Throws:
SecurityException

decryptRefreshToken

public static RefreshToken decryptRefreshToken(OAuthDataProvider provider,
                                               String encodedToken,
                                               Key key)
                                        throws SecurityException
Throws:
SecurityException

decryptRefreshToken

public static RefreshToken decryptRefreshToken(OAuthDataProvider provider,
                                               String encodedData,
                                               Key key,
                                               KeyProperties props)
                                        throws SecurityException
Throws:
SecurityException

decryptCodeGrant

public static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider,
                                                            String encodedToken,
                                                            String encodedSecretKey)
                                                     throws SecurityException
Throws:
SecurityException

decryptCodeGrant

public static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider,
                                                            String encodedToken,
                                                            String encodedSecretKey,
                                                            KeyProperties props)
                                                     throws SecurityException
Throws:
SecurityException

decryptCodeGrant

public static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider,
                                                            String encodedToken,
                                                            Key key)
                                                     throws SecurityException
Throws:
SecurityException

decryptCodeGrant

public static ServerAuthorizationCodeGrant decryptCodeGrant(OAuthDataProvider provider,
                                                            String encodedData,
                                                            Key key,
                                                            KeyProperties props)
                                                     throws SecurityException
Throws:
SecurityException

recreateAccessToken

public static ServerAccessToken recreateAccessToken(OAuthDataProvider provider,
                                                    String newTokenKey,
                                                    String decryptedSequence)
                                             throws SecurityException
Throws:
SecurityException

recreateRefreshToken

public static RefreshToken recreateRefreshToken(OAuthDataProvider provider,
                                                String newTokenKey,
                                                String decryptedSequence)
                                         throws SecurityException
Throws:
SecurityException

recreateCodeGrant

public static ServerAuthorizationCodeGrant recreateCodeGrant(OAuthDataProvider provider,
                                                             String decryptedSequence)
                                                      throws SecurityException
Throws:
SecurityException

recreateClient

public static Client recreateClient(String sequence)
                             throws SecurityException
Throws:
SecurityException


Apache CXF