-
Notifications
You must be signed in to change notification settings - Fork 12
Client id secret #135
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
base: main
Are you sure you want to change the base?
Client id secret #135
Conversation
Removed the reference to the CocoaPods project from the workspace and added a Package.resolved file for Swift Package Manager, specifying CSV.swift and SwiftyJSON as dependencies. This migrates dependency management from CocoaPods to SwiftPM.
Implements applicationSupportsSecureRestorableState to return true, enabling secure state restoration for the app.
Replaces username/password authentication with OAuth client credentials (Client ID and Client Secret) for Jamf Pro API. Updates UI labels, placeholders, and prompts to reflect the new authentication method. Refactors Keychain storage, login logic, and token management to use client credentials and handle OAuth token responses, including new token and expiration handling. Improves user guidance and error messages for the new authentication flow.
Deleted the base64Credentials(user:password:) function from dataPreparation.swift as it is no longer used in the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request migrates the application's authentication mechanism from username/password terminology to "Client ID" and "Client Secret" to better align with Jamf Pro API Client authentication. The changes encompass UI updates, keychain storage refactoring, dependency management migration from CocoaPods to Swift Package Manager, and security enhancements.
- Refactored KeyChainHelper and related authentication flow to use clientId/clientSecret instead of username/password
- Updated login UI text, placeholders, and prompts to reflect API Client credential terminology
- Migrated from CocoaPods to Swift Package Manager for dependency management
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| The MUT/KeychainHelper.swift | Refactored credential storage to use clientId and clientSecret parameters instead of username and password |
| The MUT/Base.lproj/Main.storyboard | Updated UI elements with "Client ID" and "Client Secret" placeholders and revised login prompt text |
| The MUT/loginWindow.swift | Updated outlet names and credential handling to use clientId/clientSecret terminology |
| The MUT/popPrompt.swift | Revised error messages to reference "API Client credentials" instead of username/password |
| The MUT/AppDelegate.swift | Implemented applicationSupportsSecureRestorableState for enhanced security |
| MUT.xcworkspace/contents.xcworkspacedata | Removed CocoaPods project reference |
| MUT.xcworkspace/xcshareddata/swiftpm/Package.resolved | Added Swift Package Manager dependencies (CSV.swift and SwiftyJSON) |
Files not reviewed (1)
- The MUT.xcworkspace/contents.xcworkspacedata: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replaces manual token URL construction with the dataPreparation.generateJpapiURL method for improved consistency and maintainability in the getToken function.
This pull request updates the application's authentication flow and related UI to use "Client ID" and "Client Secret" terminology instead of "Username" and "Password." It also updates the keychain helper logic, improves secure state restoration, and makes several minor UI and dependency adjustments.
Authentication Flow and Keychain Updates:
KeyChainHelperto useclientIdandclientSecretinstead ofusernameandpassword, updating all relevant variable names and data handling accordingly. [1] [2]UI and Storyboard Adjustments:
Dependency and Project Configuration:
CSV.swiftandSwiftyJSON) inPackage.resolved. [1] [2]App Delegate Enhancement:
applicationSupportsSecureRestorableState(_:)to returntrue, enhancing app security and state restoration support.Xcode/Storyboard Maintenance: