Skip to content

Update OIDEndSessionRequest method signature to match nullability on type#753

Closed
mt00chikin wants to merge 2 commits intoopenid:masterfrom
mt00chikin:endsessionrequest.nullable_idhint
Closed

Update OIDEndSessionRequest method signature to match nullability on type#753
mt00chikin wants to merge 2 commits intoopenid:masterfrom
mt00chikin:endsessionrequest.nullable_idhint

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?

@mt00chikin
Copy link
Author

Accomplished by #727

@mt00chikin mt00chikin closed this Oct 8, 2024
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