Skip to content

[Bug]: SessionAuthenticationApi.create_authentication_session has extra argument #392

@luhn

Description

@luhn

Description

create_authentication_session requires an extra argument that isn't used

Steps to reproduce

SessionAuthenticationApi.create_authentication_session has arguments request and authenticationSessionRequest. The latter is not used anywhere and appears to have no bearing the behavior of the function, but is still a required argument.

def create_authentication_session(self, request, authenticationSessionRequest, idempotency_key=None, **kwargs):
"""
Create a session token
"""
endpoint = self.baseUrl + f"/sessions"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

Actual behavior

No response

Expected behavior

The method should only have the request argument, which matches the rest of the API methods.

Code snippet or screenshots (if applicable)

To work around this, I'm passing in a placeholder argument:

session_api.create_authentication_session({
    'allowOrigin': origin,
    'product': 'platform',
    'policy': {
        'resources': [
            {
                'accountHolderId': account_id,
                'type': 'accountHolder',
            },
        ],
        'roles': ['Capital Component: Manage'],
    },
}, 'UNUSED')

Adyen Python API Library version

13.6

Python Language version

Python 3.10

Operating System

macOS

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions