Package com.saperion.ngc.util
Class SignatureHandler
- java.lang.Object
-
- com.saperion.ngc.util.SignatureHandler
-
- All Implemented Interfaces:
java.io.Serializable
public final class SignatureHandler extends java.lang.Object implements java.io.SerializableHelper-class that verifies SAP Viewer URLs with a signature.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDDCDDC tag.static java.lang.StringEXPIREExpire tag.static java.lang.StringHDOCHDOC tag.static java.lang.StringMANDANTTenant tag.static java.lang.StringSAMLALIASAlias for SAML SSO.static java.lang.StringSAPVIEWERALIASAlias for SAP Web Viewer.static java.util.List<java.lang.String>SEC_FIELDSSeckey tags.static java.lang.StringSECKEYSeckey tag.static java.lang.StringUSERUser tag.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SignatureHandlergetInstance()java.lang.StringverifySeckeyURL(java.lang.String url, java.lang.String alias)
-
-
-
Field Detail
-
EXPIRE
public static final java.lang.String EXPIRE
Expire tag.- See Also:
- Constant Field Values
-
DDC
public static final java.lang.String DDC
DDC tag.- See Also:
- Constant Field Values
-
USER
public static final java.lang.String USER
User tag.- See Also:
- Constant Field Values
-
MANDANT
public static final java.lang.String MANDANT
Tenant tag.- See Also:
- Constant Field Values
-
HDOC
public static final java.lang.String HDOC
HDOC tag.- See Also:
- Constant Field Values
-
SECKEY
public static final java.lang.String SECKEY
Seckey tag.- See Also:
- Constant Field Values
-
SAPVIEWERALIAS
public static final java.lang.String SAPVIEWERALIAS
Alias for SAP Web Viewer.- See Also:
- Constant Field Values
-
SAMLALIAS
public static final java.lang.String SAMLALIAS
Alias for SAML SSO.- See Also:
- Constant Field Values
-
SEC_FIELDS
public static final java.util.List<java.lang.String> SEC_FIELDS
Seckey tags.
-
-
Method Detail
-
getInstance
public static SignatureHandler getInstance()
- Returns:
- SignatureHandler instance
-
verifySeckeyURL
public java.lang.String verifySeckeyURL(java.lang.String url, java.lang.String alias) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.KeyStoreException, java.security.SignatureException- Parameters:
url- URL with seckey tag.alias- Keystore alias- Returns:
- URL without seckey or empty string, if verify fails.
- Throws:
java.security.NoSuchAlgorithmException- Algorithm not foundjava.security.InvalidKeyException- Invalid key foundjava.security.KeyStoreException- Keystore failurejava.security.SignatureException- Signature failure
-
-