Class SAD
- java.lang.Object
-
- se.litsec.swedisheid.opensaml.saml2.signservice.sap.SAD
-
public class SAD extends Object
Representation of the Signature Activation Data (SAD) as described in the "Signature Activation Protocol for Federated Signing" specification.- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSAD.ExtensionRepresents the SAD Extension claim as described in section 3.2.1.2 of the "Signature Activation Protocol for Federated Signing" specification.
-
Constructor Summary
Constructors Constructor Description SAD()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static SADfromJson(String json)Creates aSADobject from its JSON representation.StringgetAudience()Returns the entityID of the Signature Service which is the recipient of this SAD.IntegergetExpiry()Returns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).InstantgetExpiryDateTime()Returns the time when this SAD is no longer valid as aInstantinstance.IntegergetIssuedAt()Returns the time when this SAD was issued (epoch time/seconds since 1970-01-01).InstantgetIssuedAtDateTime()Returns the time when this SAD was issued as aInstantinstance.StringgetIssuer()Returns the entityID of the IdP that generated this SAD.StringgetJwtId()Returns the unique identifier of this JWT.SAD.ExtensiongetSeElnSadext()Returns the SAD extension claim.StringgetSubject()Returns the attribute value of the signer's unique identifier attribute.inthashCode()voidsetAudience(String audience)Assigns the entityID of the Signature Service which is the recipient of this SAD.voidsetExpiry(Integer expiry)Assigns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).voidsetExpiry(Instant expiry)Assigns the time when this SAD is no longer valid.voidsetIssuedAt(Integer issuedAt)Assigns the time when this SAD was issued (epoch time/seconds since 1970-01-01).voidsetIssuedAt(Instant issuedAt)Assigns the time when this SAD was issued.voidsetIssuer(String issuer)Assigns the entityID of the IdP that generated this SAD.voidsetJwtId(String jwtId)Assigns the unique identifier of this JWT.voidsetSeElnSadext(SAD.Extension seElnSadext)Assigns the SAD extension claim.voidsetSubject(String subject)Assigns the attribute value of the signer's unique identifier attribute.StringtoJson()Serializes the SAD object into its JSON representation.byte[]toJsonBytes()Serializes the SAD object into its JSON byte representation.StringtoString()
-
-
-
Method Detail
-
fromJson
public static SAD fromJson(String json) throws IOException
Creates aSADobject from its JSON representation.- Parameters:
json- the JSON representation- Returns:
- a
SADobject - Throws:
IOException- for parsing errors
-
toJson
public String toJson() throws IOException
Serializes the SAD object into its JSON representation.- Returns:
- the JSON representation
- Throws:
IOException- for processing errors
-
toJsonBytes
public byte[] toJsonBytes() throws IOExceptionSerializes the SAD object into its JSON byte representation.- Returns:
- the JSON bytes
- Throws:
IOException- for processing errors
-
getSubject
public String getSubject()
Returns the attribute value of the signer's unique identifier attribute.- Returns:
- the user ID
-
setSubject
public void setSubject(String subject)
Assigns the attribute value of the signer's unique identifier attribute.- Parameters:
subject- the user ID
-
getAudience
public String getAudience()
Returns the entityID of the Signature Service which is the recipient of this SAD.- Returns:
- the entityID of the recipient
-
setAudience
public void setAudience(String audience)
Assigns the entityID of the Signature Service which is the recipient of this SAD.- Parameters:
audience- the entityID of the recipient
-
getIssuer
public String getIssuer()
Returns the entityID of the IdP that generated this SAD.- Returns:
- the IdP entityID
-
setIssuer
public void setIssuer(String issuer)
Assigns the entityID of the IdP that generated this SAD.- Parameters:
issuer- the IdP entityID
-
getExpiry
public Integer getExpiry()
Returns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).- Returns:
- number of seconds since 1970-01-01
-
getExpiryDateTime
public Instant getExpiryDateTime()
Returns the time when this SAD is no longer valid as aInstantinstance.- Returns:
- expiration time
-
setExpiry
public void setExpiry(Integer expiry)
Assigns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).- Parameters:
expiry- number of seconds since 1970-01-01
-
setExpiry
public void setExpiry(Instant expiry)
Assigns the time when this SAD is no longer valid.- Parameters:
expiry- expiration time
-
getIssuedAt
public Integer getIssuedAt()
Returns the time when this SAD was issued (epoch time/seconds since 1970-01-01).- Returns:
- number of seconds since 1970-01-01
-
getIssuedAtDateTime
public Instant getIssuedAtDateTime()
Returns the time when this SAD was issued as aInstantinstance.- Returns:
- timestamp
-
setIssuedAt
public void setIssuedAt(Integer issuedAt)
Assigns the time when this SAD was issued (epoch time/seconds since 1970-01-01).- Parameters:
issuedAt- number of seconds since 1970-01-01
-
setIssuedAt
public void setIssuedAt(Instant issuedAt)
Assigns the time when this SAD was issued.- Parameters:
issuedAt- issue time
-
getJwtId
public String getJwtId()
Returns the unique identifier of this JWT.- Returns:
- JWT ID
-
setJwtId
public void setJwtId(String jwtId)
Assigns the unique identifier of this JWT.- Parameters:
jwtId- JWT ID
-
getSeElnSadext
public SAD.Extension getSeElnSadext()
Returns the SAD extension claim.- Returns:
- SAD extension claim
-
setSeElnSadext
public void setSeElnSadext(SAD.Extension seElnSadext)
Assigns the SAD extension claim.- Parameters:
seElnSadext- SAD extension claim
-
-