Class MMFATransactionData


  • public class MMFATransactionData
    extends java.lang.Object
    A class representing a Mobile Multi-Factor Authenticator transaction.
    • Constructor Summary

      Constructors 
      Constructor Description
      MMFATransactionData​(TransactionData txn)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      A MMFA transaction is equal if the transaction uuid is the same.
      java.lang.String getAction()
      Get the HTTP action required to complete this transaction.
      java.lang.String[] getAttributeNames()
      Method to obtian a list of the transaction attribute names associated with this transaction id.
      java.lang.String[] getAttributeValues​(java.lang.String attrName)
      Method to obtain a transaction attribute values by its attribute name.
      java.lang.String getAuthenticationPolicyURI()
      Get the authentication policy URI which much be completed to verify this transaction.
      java.lang.String getCreationTime()
      Get the time stamp when this transaction was first created.
      java.lang.String getLastActivityTime()
      Get the time when this transaction was last updated.
      java.lang.String getRequestURL()
      Get the AuthSvc URL which can be used by a MMFA client to verify this transaction.
      java.lang.String getResult()
      Get the current result state of the transaction. valid values are "SUCCESS", "FAIL" and "PENDING"
      java.lang.String getTransactionId()
      Get the transaction uuid.
      java.lang.String getUsername()
      Get username for user who initiated this transaction.
      JSONObject toJson()
      Get a JSON formatted representation of this MMFATransactionData.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MMFATransactionData

        public MMFATransactionData​(TransactionData txn)
    • Method Detail

      • getTransactionId

        public java.lang.String getTransactionId()
        Get the transaction uuid.
        Returns:
        The uuid of the MMFA transaction.
      • getUsername

        public java.lang.String getUsername()
        Get username for user who initiated this transaction.
        Returns:
        The username associated with the MMFA transaction
      • getCreationTime

        public java.lang.String getCreationTime()
        Get the time stamp when this transaction was first created. Time is returned as a unix timestamp
        Returns:
        The UNIX timestamp when this transaction was created
      • getLastActivityTime

        public java.lang.String getLastActivityTime()
        Get the time when this transaction was last updated. Time is returned as a unix timestamp.
        Returns:
        The UNIX timestamp when this transaction was last updated.
      • getAuthenticationPolicyURI

        public java.lang.String getAuthenticationPolicyURI()
        Get the authentication policy URI which much be completed to verify this transaction.
        Returns:
        The authentication policy used to complete this transaction
      • getRequestURL

        public java.lang.String getRequestURL()
        Get the AuthSvc URL which can be used by a MMFA client to verify this transaction.
        Returns:
        The URL used by a MMFA client to verify this transaction.
      • getAction

        public java.lang.String getAction()
        Get the HTTP action required to complete this transaction.
        Returns:
        The action of the MMFA client to complete this transaction.
      • getResult

        public java.lang.String getResult()
        Get the current result state of the transaction. valid values are "SUCCESS", "FAIL" and "PENDING"
        Returns:
        The current result of this MMFA transaction
      • getAttributeNames

        public java.lang.String[] getAttributeNames()
        Method to obtian a list of the transaction attribute names associated with this transaction id.
        Returns:
        The list of attribute names. If no attributes exist then an empty array is returned.
      • getAttributeValues

        public java.lang.String[] getAttributeValues​(java.lang.String attrName)
        Method to obtain a transaction attribute values by its attribute name.
        Parameters:
        attrName -
        Returns:
        The attribute value or null if the attribute or the contained attribute value is not present.
      • toJson

        public JSONObject toJson()
        Get a JSON formatted representation of this MMFATransactionData. Example:
         {
             "id" : "41bbd12e-bad2-11ec-9eda-f875a41e1504",
             "result": "PENDING",
             "username": "testuser",
             "creation": "1649817345"
             "last_update": "1649817345",
             "authentication_policy": "urn:ibm:security:authentication:asf:mmfa_fingerprint",
             "request_url": "https://www.myidp.ibm.com/mga/sps/apiauthsvc/mmfa_fingerprint",
             "action": "POST",
             "attributes": [{"amount":"$10000AUD"}]
         }
         
        Returns:
        A JSONObject representation of this MMFA transaction.
        See Also:
        IBM JSONObject
      • equals

        public boolean equals​(java.lang.Object o)
        A MMFA transaction is equal if the transaction uuid is the same.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object to test equality for.
        Returns:
        true if object has the same transaction uuid as this transaction; otherwise false.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object