it.eng.spagobi.engines.jpivot.security
Class SecurityUtilities

java.lang.Object
  extended byit.eng.spagobi.engines.jpivot.security.SecurityUtilities

public class SecurityUtilities
extends java.lang.Object


Constructor Summary
SecurityUtilities(org.apache.log4j.Logger log)
           
 
Method Summary
 boolean authenticate(java.lang.String token, java.lang.String tokenclear, java.security.PublicKey publicKey)
          Authenticate the caller (must be SpagoBI)
 byte[] decodeBase64(java.lang.String encoded)
          Decode a Base64 String into a byte array
 java.security.PublicKey getPublicKey()
          Get the SpagoBI Public Key for a DSA alghoritm
 boolean verifySignature(byte[] tokenclear, byte[] tokensign, java.security.PublicKey publicKeyDSASbi)
          Verify the signature
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityUtilities

public SecurityUtilities(org.apache.log4j.Logger log)
Method Detail

getPublicKey

public java.security.PublicKey getPublicKey()
Get the SpagoBI Public Key for a DSA alghoritm

Returns:
Public Key for SpagoBI (DSA alghoritm)

decodeBase64

public byte[] decodeBase64(java.lang.String encoded)
Decode a Base64 String into a byte array

Parameters:
encoded - String encoded with Base64 algorithm
Returns:
byte array decoded

verifySignature

public boolean verifySignature(byte[] tokenclear,
                               byte[] tokensign,
                               java.security.PublicKey publicKeyDSASbi)
Verify the signature

Parameters:
tokenclear - Clear data
tokensign - Signed data
Returns:

authenticate

public boolean authenticate(java.lang.String token,
                            java.lang.String tokenclear,
                            java.security.PublicKey publicKey)
Authenticate the caller (must be SpagoBI)

Returns:
boolean, true if autheticated false otherwise