Interface ConsentReferencePolicy


  • public interface ConsentReferencePolicy
    Defines how to reference a consent.
    Author:
    fpo
    • Method Detail

      • fromURL

        ConsentReference fromURL​(String redirectId,
                                 ConsentType consentType,
                                 String encryptedConsentId)
                          throws InvalidConsentException
        Produces The consent reference based on the inbound URL parameter. I sure, just store those url parameters so we can keep them in a consent cookie. The inbound url will contain either an ais consentId or the pis paymentId. We call any of them an encrypted consent id.
        Parameters:
        redirectId - : the redirect id.
        consentType - : the type of consent requested payment, account information, cancelation.
        encryptedConsentId - the encrypted consent id
        Returns:
        a holder of the consent references
        Throws:
        InvalidConsentException - the consent with the given redirect id is not found or is expired.
      • fromRequest

        ConsentReference fromRequest​(String encryptedConsentId,
                                     String authorizationId,
                                     String cookieString,
                                     boolean strict)
                              throws AuthorizationException
        Produces a consent reference from a web request. Given encryptedConsentId and authorizationId are matched against the values stored in the cookie.
        Parameters:
        encryptedConsentId - : the encrypted consent id from the request url
        authorizationId - : the authorization id from the request url
        cookieString - : the cookie string associated with the request.
        strict - : if strict, the authorization id will be validated.
        Returns:
        a holder of the consent references
        Throws:
        AuthorizationException - the consent is not found of the scaId does not match the consent cookie.