Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OIDEndSessionRequest method signature to match nullability on type #753

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mt00chikin
Copy link

@mt00chikin mt00chikin commented Feb 17, 2023

This updates the idTokenHint nullability annotation in OIDEndSessionRequest's initializers to match the property attributes on the type, so that Swift clients can use these methods more easily.
idTokenHint is declared as nullable on OIDEndSessionRequest and the implementation of this class already accounts for the possibility of the property being nil. However, the initializer methods omit the nullable annotation for the idTokenHint parameter.
In Objective-C based clients this does not present a problem, since the compiler will allow nil to be passed in the init method. Swift clients, however, will fail to compile because the Swift interface treats idTokenHint as a String and not a String?.

This results in the following updated Swift interface:

/** @brief Creates an authorization request with opinionated defaults (a secure @c state).
        @param configuration The service's configuration.
        @param idTokenHint The previously issued ID Token
        @param postLogoutRedirectURL The client's post-logout redirect URI.
            callback.
        @param additionalParameters The client's additional authorization parameters.
    */
    public convenience init(configuration: OIDServiceConfiguration, idTokenHint: String?, postLogoutRedirectURL: URL, additionalParameters: [String : String]?)

    
    /** @brief Designated initializer.
        @param configuration The service's configuration.
        @param idTokenHint The previously issued ID Token
        @param postLogoutRedirectURL The client's post-logout redirect URI.
        @param state An opaque value used by the client to maintain state between the request and
            callback.
        @param additionalParameters The client's additional authorization parameters.
     */
    public init(configuration: OIDServiceConfiguration, idTokenHint: String?, postLogoutRedirectURL: URL, state: String, additionalParameters: [String : String]?)

This PR resolves the issue reported in #665

@mt00chikin
Copy link
Author

FYI, I have started the process of executing the agreements per the CONTRIBUTING guidelines

@ir-fuel
Copy link

ir-fuel commented Aug 21, 2024

Will this ever get merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants