com.jaspersoft.jasperserver.api.metadata.common.service.impl
Class PasswordCipherer

java.lang.Object
  extended by com.jaspersoft.jasperserver.api.metadata.common.service.impl.PasswordCipherer
All Implemented Interfaces:
org.acegisecurity.providers.encoding.PasswordEncoder

public class PasswordCipherer
extends java.lang.Object
implements org.acegisecurity.providers.encoding.PasswordEncoder

This class is used to encrypt/decrypt passwords both in acegi domain and also throughout the applicaton.


Constructor Summary
PasswordCipherer()
          Constuctor to be called only from Spring framework
 
Method Summary
 java.lang.String decodePassword(java.lang.String encPass)
          Decodes the specified raw password with an implementation specific algorithm if allowEncoding is TRUE.
 java.lang.String encodePassword(java.lang.String rawPass)
          Encodes the specified raw password with an implementation specific algorithm if allowEncoding is TRUE.
 java.lang.String encodePassword(java.lang.String rawPass, java.lang.Object salt)
          PasswordEncoder METHODS
 java.lang.String getCipherTransformation()
           
static PasswordCipherer getInstance()
          singleton accessor
 java.lang.String getSecretKey()
           
 java.lang.String getSecretKeyAlgorithm()
           
 boolean isAllowEncoding()
           
 boolean isKeyInPlainText()
           
 boolean isPasswordValid(java.lang.String encPass, java.lang.String rawPass, java.lang.Object salt)
           
 void setAllowEncoding(boolean allowEncoding)
           
 void setCipherTransformation(java.lang.String cipherTransformation)
           
 void setKeyInPlainText(boolean keyInPlainText)
           
 void setSecretKey(java.lang.String secretKey)
           
 void setSecretKeyAlgorithm(java.lang.String secretKeyAlgorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordCipherer

public PasswordCipherer()
Constuctor to be called only from Spring framework

Method Detail

getInstance

public static PasswordCipherer getInstance()
singleton accessor

Returns:
LicenseBean

decodePassword

public java.lang.String decodePassword(java.lang.String encPass)

Decodes the specified raw password with an implementation specific algorithm if allowEncoding is TRUE.

Otherwise it returns encPass.

Parameters:
encPass -
Returns:
Throws:
org.springframework.dao.DataAccessException

encodePassword

public java.lang.String encodePassword(java.lang.String rawPass)
                                throws org.springframework.dao.DataAccessException

Encodes the specified raw password with an implementation specific algorithm if allowEncoding is TRUE.

Otherwise it returns rawPass.

Parameters:
rawPass -
Returns:
Throws:
org.springframework.dao.DataAccessException

encodePassword

public java.lang.String encodePassword(java.lang.String rawPass,
                                       java.lang.Object salt)
                                throws org.springframework.dao.DataAccessException
PasswordEncoder METHODS

Specified by:
encodePassword in interface org.acegisecurity.providers.encoding.PasswordEncoder
Throws:
org.springframework.dao.DataAccessException

isPasswordValid

public boolean isPasswordValid(java.lang.String encPass,
                               java.lang.String rawPass,
                               java.lang.Object salt)
                        throws org.springframework.dao.DataAccessException
Specified by:
isPasswordValid in interface org.acegisecurity.providers.encoding.PasswordEncoder
Throws:
org.springframework.dao.DataAccessException

isAllowEncoding

public boolean isAllowEncoding()
Returns:
Returns the allowEncoding.

setAllowEncoding

public void setAllowEncoding(boolean allowEncoding)
Parameters:
allowEncoding - The allowEncoding to set.

getCipherTransformation

public java.lang.String getCipherTransformation()
Returns:
Returns the cipherTransformation.

setCipherTransformation

public void setCipherTransformation(java.lang.String cipherTransformation)
Parameters:
cipherTransformation - The cipherTransformation to set.

isKeyInPlainText

public boolean isKeyInPlainText()
Returns:
Returns the keyInPlainText.

setKeyInPlainText

public void setKeyInPlainText(boolean keyInPlainText)
Parameters:
keyInPlainText - The keyInPlainText to set.

getSecretKey

public java.lang.String getSecretKey()
Returns:
Returns the secretKey.

setSecretKey

public void setSecretKey(java.lang.String secretKey)
Parameters:
secretKey - The secretKey to set.

getSecretKeyAlgorithm

public java.lang.String getSecretKeyAlgorithm()
Returns:
Returns the secretKeyAlgorithm.

setSecretKeyAlgorithm

public void setSecretKeyAlgorithm(java.lang.String secretKeyAlgorithm)
Parameters:
secretKeyAlgorithm - The secretKeyAlgorithm to set.


Copyright © 2007. All Rights Reserved.