Skip to content

[Don't Merge] Swiftify AuthInfo - #3904

Closed
Crebs wants to merge 1 commit into
forcedotcom:devfrom
Crebs:Swith-AuthInfo
Closed

[Don't Merge] Swiftify AuthInfo#3904
Crebs wants to merge 1 commit into
forcedotcom:devfrom
Crebs:Swith-AuthInfo

Conversation

@Crebs

@Crebs Crebs commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Converted AuthInfo from Objc to Swift. Thoughts?

@bbirman bbirman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice candidate for modernizing

import Foundation

@objc(SFOAuthType)
public enum AuthType: Int {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a breaking change because a case in Swift would currently be AuthInfo.AuthType.IDP vs AuthType.IDP, but maybe we could do it in 14.0 as in-place change instead of having a deprecation path since it's more of a straight forward rename?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that’s why we have the static constants below, from line 55 to 63. In Objective-C, they can still call SFOAuthTypeIDP. But yeah, not a 13.x change for sure.


// Objective-C class factory method
@objc(infoWithAuthType:)
public class func info(withAuthType authType: AuthType) -> AuthInfo {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the use case for this vs init at line 77? I got confused by the comments because I thought one was for Objective-C and one was for Swift but they look like they're both available for both languages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your right. I think I tried to put this up before the weekend and missed a couple things. I'll clean this up again.

@wmathurin wmathurin closed this Oct 29, 2025
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.

3 participants