Skip to content

Commit

Permalink
ability to customize Share menu item; added username for AD and OIDC …
Browse files Browse the repository at this point in the history
…in menu
  • Loading branch information
twocanoes committed Feb 4, 2024
1 parent 9453fbd commit b67970a
Show file tree
Hide file tree
Showing 17 changed files with 197 additions and 71 deletions.
14 changes: 13 additions & 1 deletion Profile Manifest/com.twocanoes.xcreds.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>pfm_app_url</key>
<string>https://github.com/twocanoes/xcreds</string>
<key>pfm_description</key>
<string>XCreds 4.1 (6301) OAuth Settings</string>
<string>XCreds 4.1 (6302) OAuth Settings</string>
<key>pfm_documentation_url</key>
<string>https://twocanoes.com/knowledge-base/xcreds-admin-guide/#preferences</string>
<key>pfm_domain</key>
Expand Down Expand Up @@ -426,6 +426,18 @@ A profile can consist of payloads with different version numbers. For example, c
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_description</key>
<string>Name for Shares menu item. Default: &quot;Shares&quot;.</string>
<key>pfm_documentation_url</key>
<string>https://twocanoes.com/knowledge-base/xcreds-admin-guide/#preferences</string>
<key>pfm_name</key>
<string>shareMenuItemName</string>
<key>pfm_title</key>
<string>Share Menu Item Name</string>
<key>pfm_type</key>
<string>string</string>
</dict>
<dict>
<key>pfm_description</key>
<string>Add a menu item for changing the password that will open this URL when the menu item is selected.</string>
Expand Down
2 changes: 1 addition & 1 deletion XCreds Login Overlay/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@
<rect key="frame" x="0.0" y="39" width="395" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MrL-Zn-3BA">
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MrL-Zn-3BA">
<rect key="frame" x="43" y="6" width="88" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Cloud Login" drawsBackground="YES" id="UqT-fq-knF">
Expand Down
10 changes: 5 additions & 5 deletions XCreds/AboutWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
<scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bSr-fP-G7u">
<rect key="frame" x="20" y="20" width="875" height="524"/>
<clipView key="contentView" drawsBackground="NO" id="ca1-PV-x7f">
<rect key="frame" x="0.0" y="0.0" width="875" height="524"/>
<rect key="frame" x="0.0" y="0.0" width="860" height="524"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView wantsLayer="YES" editable="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" allowsCharacterPickerTouchBarItem="NO" textCompletion="NO" id="HTA-3B-1DF">
<rect key="frame" x="0.0" y="0.0" width="875" height="524"/>
<rect key="frame" x="0.0" y="0.0" width="860" height="524"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="875" height="524"/>
<size key="minSize" width="860" height="524"/>
<size key="maxSize" width="875" height="10000000"/>
<attributedString key="textStorage">
<fragment content="asdffd">
Expand All @@ -60,7 +60,7 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="Nxp-18-SHh">
<rect key="frame" x="859" y="0.0" width="16" height="524"/>
<rect key="frame" x="860" y="0.0" width="15" height="524"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
Expand All @@ -77,7 +77,7 @@
</connections>
<point key="canvasLocation" x="401.5" y="387"/>
</window>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="dXE-Xt-nIV">
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" id="dXE-Xt-nIV">
<rect key="frame" x="0.0" y="0.0" width="90" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="DiscoveryURL" id="1hp-g2-T6a">
Expand Down
28 changes: 21 additions & 7 deletions XCreds/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -689,45 +689,58 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="Uvh-o1-mcs"/>
<menuItem title="Next Password Check: Time" tag="2" enabled="NO" id="7wW-bt-MeR">
<menuItem title="OIDC Usernaem" tag="2" enabled="NO" id="7wW-bt-MeR">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="nextPasswordCheckTimeMenuItemSelected:" target="1OV-ou-Ss5" id="Gny-X3-1ZT"/>
</connections>
</menuItem>
<menuItem title="Credential Status: None" tag="3" enabled="NO" id="YLv-mh-piZ">
<menuItem title="AD Username" tag="3" enabled="NO" id="YN2-wy-F8O">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="nextPasswordCheckTimeMenuItemSelected:" target="1OV-ou-Ss5" id="WgI-co-0gy"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="ftq-kh-g8g"/>
<menuItem title="Next Password Check: Time" tag="4" enabled="NO" id="fDN-bq-7LZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="nextPasswordCheckTimeMenuItemSelected:" target="1OV-ou-Ss5" id="NMe-oq-fDO"/>
</connections>
</menuItem>
<menuItem title="Credential Status: None" tag="5" enabled="NO" id="YLv-mh-piZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="credentialStatusMenuItemSelected:" target="1OV-ou-Ss5" id="VVt-Zd-Ui7"/>
</connections>
</menuItem>
<menuItem title="Password Expires: " tag="4" enabled="NO" id="vin-yR-IbW">
<menuItem title="Password Expires: " tag="6" enabled="NO" id="vin-yR-IbW">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="credentialStatusMenuItemSelected:" target="1OV-ou-Ss5" id="l6Y-88-b28"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="mwR-f8-XvQ"/>
<menuItem title="Sign In" tag="5" id="FH2-NT-oeX">
<menuItem title="Sign In" tag="7" id="FH2-NT-oeX">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="signInMenuItemSelected:" target="1OV-ou-Ss5" id="Mra-OX-Nqy"/>
</connections>
</menuItem>
<menuItem title="Change Password" tag="6" id="F1e-WL-4b2">
<menuItem title="Change Password" tag="8" id="F1e-WL-4b2">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="changePasswordMenuItemSelected:" target="1OV-ou-Ss5" id="dfP-8J-fS8"/>
</connections>
</menuItem>
<menuItem title="Shares" tag="7" hidden="YES" id="qRq-yn-8sT">
<menuItem title="Shares" tag="9" hidden="YES" id="qRq-yn-8sT">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="changePasswordMenuItemSelected:" target="1OV-ou-Ss5" id="mhw-jg-LgC"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="op6-Hq-2li"/>
<menuItem title="Quit" tag="8" id="OM5-mb-fFV">
<menuItem title="Quit" tag="10" id="OM5-mb-fFV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="quitMenuItemSelected:" target="1OV-ou-Ss5" id="yL8-dQ-nRK"/>
Expand All @@ -748,6 +761,7 @@
<outlet property="nextPasswordCheckMenuItem" destination="7wW-bt-MeR" id="mLr-Dz-KFF"/>
<outlet property="quitMenuItem" destination="OM5-mb-fFV" id="M6F-cZ-LFl"/>
<outlet property="quitMenuItemSeparator" destination="op6-Hq-2li" id="zC1-TH-cF8"/>
<outlet property="sharesMenuItem" destination="qRq-yn-8sT" id="sMU-09-qGu"/>
<outlet property="signinMenuItem" destination="FH2-NT-oeX" id="een-3k-67g"/>
<outlet property="statusMenu" destination="6OK-7Y-Yf9" id="WfZ-uc-xzV"/>
</connections>
Expand Down
2 changes: 1 addition & 1 deletion XCreds/DesktopLoginWindowController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="453" y="250" width="628" height="613"/>
<rect key="screenRect" x="0.0" y="0.0" width="1496" height="910"/>
<view key="contentView" wantsLayer="YES" misplaced="YES" id="2LH-tE-efn">
<view key="contentView" wantsLayer="YES" id="2LH-tE-efn">
<rect key="frame" x="0.0" y="0.0" width="628" height="613"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
Expand Down
2 changes: 1 addition & 1 deletion XCreds/LoginWebViewController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<window title="Sign In" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titleVisibility="hidden" id="KxT-zM-Vnn" customClass="LoginWindow" customModule="XCredsLoginPlugin">
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="453" y="250" width="1002" height="883"/>
<rect key="screenRect" x="0.0" y="0.0" width="3440" height="1415"/>
<rect key="screenRect" x="0.0" y="0.0" width="1496" height="910"/>
<view key="contentView" wantsLayer="YES" id="2LH-tE-efn">
<rect key="frame" x="0.0" y="0.0" width="1002" height="883"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down
2 changes: 1 addition & 1 deletion XCreds/PrefKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

enum PrefKeys: String {
case clientID, clientSecret, password="xcreds local password",discoveryURL, redirectURI, scopes, accessToken, idToken, refreshToken, tokenEndpoint, expirationDate, invalidToken, refreshRateHours,refreshRateMinutes, showDebug, verifyPassword, shouldShowQuitMenu, shouldShowPreferencesOnStart, shouldSetGoogleAccessTypeToOffline, passwordChangeURL, shouldShowAboutMenu, username, idpHostName, passwordElementID, shouldFindPasswordElement, shouldShowVersionInfo, shouldShowSupportStatus,shouldShowConfigureWifiButton,shouldShowMacLoginButton, loginWindowBackgroundImageURL, shouldShowCloudLoginByDefault, shouldPreferLocalLoginInsteadOfCloudLogin, idpHostNames,autoRefreshLoginTimer, loginWindowWidth, loginWindowHeight, shouldShowRefreshBanner, shouldSwitchToLoginWindowWhenLocked,accounts = "Accounts",
windowSignIn = "WindowSignIn", settingsOverrideScriptPath, localAdminUserName, localAdminPassword, usernamePlaceholder, passwordPlaceholder, shouldShowLocalOnlyCheckbox, shouldShowTokenUpdateStatus, shouldDetectNetworkToDetermineLoginWindow, showLoginWindowDelaySeconds, shouldPromptForMigration, shouldAllowKeyComboForMacLoginWindow, aliasName,claimsToAddToLocalUserAccount, loadPageTitle, loadPageInfo,shouldPromptForADPasswordChange, hideIfPathExists, allowedUsersArray, allowUsersClaim, mapKerberosPrincipalName, mapFirstName = "map_firstname",mapFullName = "map_fullname", mapUserName = "map_username", mapLastName = "map_lastname",menuItemWindowBackgroundImageURL, menuItems
windowSignIn = "WindowSignIn", settingsOverrideScriptPath, localAdminUserName, localAdminPassword, usernamePlaceholder, passwordPlaceholder, shouldShowLocalOnlyCheckbox, shouldShowTokenUpdateStatus, shouldDetectNetworkToDetermineLoginWindow, showLoginWindowDelaySeconds, shouldPromptForMigration, shouldAllowKeyComboForMacLoginWindow, aliasName,claimsToAddToLocalUserAccount, loadPageTitle, loadPageInfo,shouldPromptForADPasswordChange, hideIfPathExists, allowedUsersArray, allowUsersClaim, mapKerberosPrincipalName, mapFirstName = "map_firstname",mapFullName = "map_fullname", mapUserName = "map_username", mapLastName = "map_lastname",menuItemWindowBackgroundImageURL, menuItems, shareMenuItemName
case shouldUseROPGForPasswordChangeChecking
case shouldUseROPGForMenuLogin
case shouldUseROPGForLoginWindowLogin
Expand Down
Loading

0 comments on commit b67970a

Please sign in to comment.