Class AbstractAuthenticationSecret
- java.lang.Object
- 
- jadex.platform.service.security.auth.AbstractAuthenticationSecret
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 - Direct Known Subclasses:
- AbstractX509PemSecret,- SharedSecret
 
 public abstract class AbstractAuthenticationSecret extends java.lang.Object implements java.lang.CloneableClass representing a secret used for authentication.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.Class<?>>SECRET_TYPESTypes of authentication secret.
 - 
Constructor SummaryConstructors Constructor Description AbstractAuthenticationSecret()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleancanSign()Tests if the secret can be used for signing or, alternatively, verification only.java.lang.Objectclone()Clone support.booleanequals(java.lang.Object obj)Check if equal (String representation matches).static AbstractX509PemSecretfromKeyPair(PemKeyPair keypair, boolean ignorekey, PemKeyPair... chain)Creates an authentication secret based on a pem key pair.static AbstractAuthenticationSecretfromString(java.lang.String secret)Decodes a secret from a string.static AbstractAuthenticationSecretfromString(java.lang.String secret, boolean strict)Decodes a secret from a string.inthashCode()Hashcode is string representation hash code.static voidmain(java.lang.String[] args)
 
- 
- 
- 
Method Detail- 
canSignpublic abstract boolean canSign() Tests if the secret can be used for signing or, alternatively, verification only.- Returns:
- True, if the secret can be used for signing.
 
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionClone support.- Overrides:
- clonein class- java.lang.Object
- Throws:
- java.lang.CloneNotSupportedException
 
 - 
equalspublic boolean equals(java.lang.Object obj) Check if equal (String representation matches).- Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() Hashcode is string representation hash code.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
fromKeyPairpublic static final AbstractX509PemSecret fromKeyPair(PemKeyPair keypair, boolean ignorekey, PemKeyPair... chain) Creates an authentication secret based on a pem key pair.- Parameters:
- keypair- The key pair.
- ignorekey- If true, the secret will not include the key (verify-only).
- chain- Rest of the authentication chain.
- Returns:
- The secret.
 
 - 
fromStringpublic static final AbstractAuthenticationSecret fromString(java.lang.String secret) Decodes a secret from a string.- Parameters:
- secret- The secret as string.
- Returns:
- The instantiated secret.
 
 - 
fromStringpublic static final AbstractAuthenticationSecret fromString(java.lang.String secret, boolean strict) Decodes a secret from a string.- Parameters:
- secret- The secret as string.
- strict- If false, interpret invalid string as a password.
- Returns:
- The instantiated secret.
 
 - 
mainpublic static void main(java.lang.String[] args) 
 
- 
 
-