it.eng.spagobi.engines.jpivot.security
Class SecurityUtilities
java.lang.Object
it.eng.spagobi.engines.jpivot.security.SecurityUtilities
public class SecurityUtilities
- extends java.lang.Object
Field Summary |
private org.apache.log4j.Logger |
logger
|
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private transient org.apache.log4j.Logger logger
SecurityUtilities
public SecurityUtilities(org.apache.log4j.Logger log)
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 datatokensign
- 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)
- Parameters:
request
- HttpRequestresponse
- HttpResponse
- Returns:
- boolean, true if autheticated false otherwise