Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.0.0)

E10686-01

oracle.adf.share.security.providers.jps
Class CSFCredentialStore

java.lang.Object
  extended by oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
      extended by oracle.adf.share.security.providers.jps.CSFCredentialStore
All Implemented Interfaces:
CredentialProvisioning, CredentialStorage

public class CSFCredentialStore
extends GenericCredentialStore
implements CredentialProvisioning

Since:
release specific (what release of product did this appear in)

Field Summary
static java.lang.String APP_MAP_NAME
           
protected static java.lang.String DEFAULT_JPS_LOCATION_DT
           
protected  ADFContext mADFContext
           
protected  oracle.security.jps.service.credstore.CredentialStore mCSFCredStore
           
protected  java.lang.String mJps_store
           
protected static ADFLogger sLogger
           
 
Fields inherited from class oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
_applicationUser, _contextName, MAP_CREDENTIAL_SEPARATOR
 
Constructor Summary
CSFCredentialStore()
          Initialize the csf credential store using the ADF Security context environment.
CSFCredentialStore(java.lang.String adfContextName)
          Initialize the csf credential store using the config from named ADF context
 
Method Summary
 Credential fetchCredential(java.lang.String credentialKey)
          Fetches the credential for the given key.
 java.io.Serializable fetchSerializableCredential(java.lang.String credentialKey)
          Fetches the serializable credential for the given key.
 java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String credentialKey)
          Fetches the serializable credential for the given key.
protected  java.lang.String getMapName()
           
 void initialize(java.util.Hashtable props)
          Internal: Applications should not use this method. Initializes the credentialstore from the properties.
protected static void logFine(java.lang.String methodName, java.lang.String msg)
           
protected static void logFiner(java.lang.String methodName, java.lang.String msg)
           
protected static void logFinest(java.lang.String methodName, java.lang.String msg)
           
 void removeCredential(java.lang.String credentialKey)
          Deletes the credential for the given credential key.
 void removeCredential(java.lang.String credentialKey, java.security.Principal principal)
          Deletes the credential for the given credential key and user principal.
protected  void removeCredentialCSF(java.lang.String credentialKey, java.lang.String userUniqueId)
          Deletes the credential for the given credential key and user principal.
 void storeCredential(Credential credential, java.lang.String credentialKey)
          Stores the given credential using the given credential key scoped to the current user.
 void storeCredential(Credential credential, java.lang.String credentialKey, java.security.Principal principal)
          Stores the given credential using the given credential key scoped to the given user principal.
protected  void storeCredentialCSF(Credential credential, java.lang.String credentialKey, java.lang.String userUniqueId)
          Stores the given credential using the given credential key scoped to the given user principal.
 void storeSerializableCredential(java.io.Serializable credential, java.lang.String credentialKey, java.security.Principal principal)
          Stores the given credential using the given credential key scoped to the given user principal.
protected  void storeSerializableCredentialCSF(java.io.Serializable credential, java.lang.String credentialKey, java.lang.String userUniqueId)
          Stores the given credential using the given credential key scoped to the given user principal.
 
Methods inherited from class oracle.adf.share.security.credentialstore.spi.GenericCredentialStore
getApplicationUserName, getCredStoreAbsoluteLocation, getDefaultUser, getSecurityContext, getUserPrincipal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sLogger

protected static ADFLogger sLogger

mADFContext

protected ADFContext mADFContext

mJps_store

protected java.lang.String mJps_store

mCSFCredStore

protected oracle.security.jps.service.credstore.CredentialStore mCSFCredStore

APP_MAP_NAME

public static final java.lang.String APP_MAP_NAME
See Also:
Constant Field Values

DEFAULT_JPS_LOCATION_DT

protected static final java.lang.String DEFAULT_JPS_LOCATION_DT
Constructor Detail

CSFCredentialStore

public CSFCredentialStore()
Initialize the csf credential store using the ADF Security context environment.


CSFCredentialStore

public CSFCredentialStore(java.lang.String adfContextName)
Initialize the csf credential store using the config from named ADF context

Parameters:
adfContextName - ADF Context Name to obtain the concerned security environment
Method Detail

initialize

public void initialize(java.util.Hashtable props)
Description copied from class: GenericCredentialStore
Internal: Applications should not use this method. Initializes the credentialstore from the properties.

Specified by:
initialize in interface CredentialStorage
Specified by:
initialize in class GenericCredentialStore
Parameters:
props -

storeCredential

public void storeCredential(Credential credential,
                            java.lang.String credentialKey)
Stores the given credential using the given credential key scoped to the current user. If the current user is not available, then the credential is stored scoped to anonymous.

Specified by:
storeCredential in interface CredentialStorage
Specified by:
storeCredential in class GenericCredentialStore
Parameters:
credential - Credential to be stored
credentialKey - Key to be used for storing the credential

fetchCredential

public Credential fetchCredential(java.lang.String credentialKey)
                           throws CredentialNotFoundException
Fetches the credential for the given key. The credential fetched is mapped to the current user. If the current user is not available, then the credential is fetched scoped to anonymous.

Specified by:
fetchCredential in interface CredentialStorage
Specified by:
fetchCredential in class GenericCredentialStore
Parameters:
credentialKey - Key for which the credential needs to be fetched
Returns:
Credential for the given key
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential does not exist
CredentialNotFoundException

fetchSerializableCredentialForCurrentUser

public java.io.Serializable fetchSerializableCredentialForCurrentUser(java.lang.String credentialKey)
                                                               throws CredentialNotFoundException
Fetches the serializable credential for the given key. The credential fetched is mapped to the current user. If the current user is not available, then the credential is fetched scoped to anonymous.

Specified by:
fetchSerializableCredentialForCurrentUser in interface CredentialStorage
Overrides:
fetchSerializableCredentialForCurrentUser in class GenericCredentialStore
Parameters:
credentialKey - Key to be used to fetch the credential
Returns:
Serializable credential stored
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found TODO: Check should we just throw exception incase current user principal is not available? Otherwise there's no difference between this and fetchSerializableCredential api.
CredentialNotFoundException

fetchSerializableCredential

public java.io.Serializable fetchSerializableCredential(java.lang.String credentialKey)
                                                 throws CredentialNotFoundException
Fetches the serializable credential for the given key. The credential fetched is mapped to the current user. If the current user is not available, then the credential is fetched scoped to anonymous.

Specified by:
fetchSerializableCredential in interface CredentialStorage
Specified by:
fetchSerializableCredential in class GenericCredentialStore
Parameters:
credentialKey - Key to be used to fetch the credential
Returns:
Serializable credential stored
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

removeCredential

public void removeCredential(java.lang.String credentialKey)
                      throws CredentialNotFoundException
Deletes the credential for the given credential key. The credential to be deleted is arrived at by mapping current user principal to the credential. If user principal is not available, then credential bearing the same key against the anonymous will be deleted.

Specified by:
removeCredential in interface CredentialStorage
Specified by:
removeCredential in class GenericCredentialStore
Parameters:
credentialKey - Key for the credential to be deleted.
Throws:
oracle.security.jps.service.credstore.CredentialNotFoundException - if the credential for the given key cannot be found
CredentialNotFoundException

storeCredential

public void storeCredential(Credential credential,
                            java.lang.String credentialKey,
                            java.security.Principal principal)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Specified by:
storeCredential in interface CredentialProvisioning
Parameters:
credential - Credential to be stored
credentialKey - Key to be used for storing the credential
principal - User Principal to store the credential against

storeCredentialCSF

protected void storeCredentialCSF(Credential credential,
                                  java.lang.String credentialKey,
                                  java.lang.String userUniqueId)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Parameters:
credential - Credential to be stored
credentialKey - Key to be used for storing the credential
userUniqueId - User's unique id to store the credential against

storeSerializableCredential

public void storeSerializableCredential(java.io.Serializable credential,
                                        java.lang.String credentialKey,
                                        java.security.Principal principal)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Specified by:
storeSerializableCredential in interface CredentialProvisioning
Parameters:
credential - Serializable Credential to be stored
credentialKey - Key to be used for storing the credential
principal - User Principal to store the credential against

storeSerializableCredentialCSF

protected void storeSerializableCredentialCSF(java.io.Serializable credential,
                                              java.lang.String credentialKey,
                                              java.lang.String userUniqueId)
Stores the given credential using the given credential key scoped to the given user principal. If the given principal is null then the credential is stored scoped to anonymous.

Parameters:
credential - Serializable Credential to be stored
credentialKey - Key to be used for storing the credential
userUniqueId - User's unique id to store the credential against

removeCredential

public void removeCredential(java.lang.String credentialKey,
                             java.security.Principal principal)
                      throws CredentialNotFoundException
Deletes the credential for the given credential key and user principal. If the given principal is null then the credential scoped to anonymous is deleted.

Specified by:
removeCredential in interface CredentialProvisioning
Parameters:
credentialKey - key for the credential to be deleted
principal - User Principal for which the credential needs to be deleted.
Throws:
CredentialNotFoundException - if the credential does not exist for the given key

removeCredentialCSF

protected void removeCredentialCSF(java.lang.String credentialKey,
                                   java.lang.String userUniqueId)
                            throws CredentialNotFoundException
Deletes the credential for the given credential key and user principal. If the given principal is null then the credential scoped to anonymous is deleted.

Parameters:
credentialKey - key for the credential to be deleted
userUniqueId - User's unique id for which the credential needs to be deleted.
Throws:
CredentialNotFoundException

getMapName

protected java.lang.String getMapName()

logFine

protected static void logFine(java.lang.String methodName,
                              java.lang.String msg)

logFiner

protected static void logFiner(java.lang.String methodName,
                               java.lang.String msg)

logFinest

protected static void logFinest(java.lang.String methodName,
                                java.lang.String msg)

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.0.0)

E10686-01

Copyright © 1997, 2008, Oracle. All rights reserved.