Skip to content

Conversation

@mike-levenick
Copy link
Collaborator

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:

  • Refactored the KeyChainHelper to use clientId and clientSecret instead of username and password, updating all relevant variable names and data handling accordingly. [1] [2]
  • Updated the login UI fields and placeholder strings to "Client ID" and "Client Secret" and removed references to "Administrator Username" and "Password." [1] [2] [3]

UI and Storyboard Adjustments:

  • Updated the login prompt text to "Enter your Jamf Pro API Client and Secret" and adjusted the layout of several UI elements for consistency. [1] [2]
  • Changed some font settings from "menu" to "message" for better appearance in pop-up buttons. [1] [2] [3]
  • Made minor adjustments to element sizes and image dimensions to improve layout precision. [1] [2] [3] [4] [5]

Dependency and Project Configuration:

  • Removed the CocoaPods project reference from the workspace and added Swift Package Manager dependencies (CSV.swift and SwiftyJSON) in Package.resolved. [1] [2]

App Delegate Enhancement:

  • Implemented applicationSupportsSecureRestorableState(_:) to return true, enhancing app security and state restoration support.

Xcode/Storyboard Maintenance:

  • Updated storyboard and plugin versions to match the current Xcode environment.

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.
Copy link

Copilot AI left a 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.

@mike-levenick mike-levenick requested review from a team and chrisgzim December 24, 2025 21:03
@team-adder team-adder bot requested a review from andrew-pirkl December 24, 2025 21:03
Replaces manual token URL construction with the dataPreparation.generateJpapiURL method for improved consistency and maintainability in the getToken function.
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.

2 participants