Skip to content

base_client's create_authn_request method returns different types depending on parameters #570

Open
@tadumtada

Description

@tadumtada

Using version 4.6.3, the base_client's create_authn_request method returns different types depending on parameters sign_prepare and sign. With sign_prepare==True I get an instance of AuthnRequest, with sign_prepare==False and sign==True, it returns an unicode string which is created in entity.sign with the method signed_instance_factory.

This causes my code to brake if I change the settings/parameters.

I suggest to either change the comment in the method create_authn_request such that others don't run into the problem and not to brake any existing code or to return a consistent type or to remove the sign parameter and let everybody sign the return AuthnRequest after the create_authn_request method has been called.

The latter is what I implemented, meaning to set sign==False and sign afterwards if I want. This works but it would have been nice to have it commented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions