Skip to content

Commit

Permalink
implemented Prompt for Secure Token Admin Login When Required #123
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Dec 12, 2023
1 parent 3486151 commit 32b118f
Show file tree
Hide file tree
Showing 13 changed files with 274 additions and 61 deletions.
6 changes: 3 additions & 3 deletions XCreds Login Overlay/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
<windowStyleMask key="styleMask" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="25" y="25" width="872" height="109"/>
<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" id="1nr-Jh-HO9">
<rect key="frame" x="0.0" y="0.0" width="872" height="109"/>
<autoresizingMask key="autoresizingMask"/>
Expand All @@ -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 Expand Up @@ -729,7 +729,7 @@
<windowStyleMask key="styleMask" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="144" y="174" width="362" height="190"/>
<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" id="MiV-8U-Ioy">
<rect key="frame" x="0.0" y="0.0" width="362" height="190"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down
4 changes: 2 additions & 2 deletions XCreds/AboutWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="560" y="551" width="915" height="564"/>
<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="ZbF-tC-vpZ">
<rect key="frame" x="0.0" y="0.0" width="915" height="564"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down Expand Up @@ -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
108 changes: 106 additions & 2 deletions XCreds/LoginPasswordWindowController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="PromptForLocalPasswordWindowController" customModule="XCreds" customModuleProvider="target">
<connections>
<outlet property="adminCredentialsWindow" destination="1CI-8H-5ew" id="1aY-ev-BST"/>
<outlet property="adminPasswordTextField" destination="Vej-yJ-L7m" id="Add-Hz-899"/>
<outlet property="adminUsernameTextField" destination="A7r-Vp-fPL" id="eDj-O0-Rul"/>
<outlet property="passwordTextField" destination="uxk-Kc-Ey2" id="NeY-1n-1d3"/>
<outlet property="resetButton" destination="vfc-Lt-21D" id="b6N-K2-qOU"/>
<outlet property="window" destination="y1s-aj-r0T" id="ZcP-JQ-mk1"/>
Expand All @@ -27,7 +30,7 @@
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GHv-Is-FVt">
<rect key="frame" x="14" y="138" width="68" height="68"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="i1e-r0-Waa"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="icon_128x128" id="i1e-r0-Waa"/>
</imageView>
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NQJ-DJ-Vk6">
<rect key="frame" x="94" y="168" width="385" height="38"/>
Expand Down Expand Up @@ -120,8 +123,109 @@ Gw
</connections>
<point key="canvasLocation" x="136" y="263"/>
</window>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" frameAutosaveName="" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="1CI-8H-5ew">
<windowStyleMask key="styleMask" titled="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="537" y="504" width="503" height="255"/>
<rect key="screenRect" x="0.0" y="0.0" width="1496" height="910"/>
<view key="contentView" id="9wN-Ld-7y9">
<rect key="frame" x="0.0" y="0.0" width="503" height="255"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Xxe-1S-Zna">
<rect key="frame" x="20" y="138" width="68" height="68"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="icon_128x128" id="POn-cP-I3n"/>
</imageView>
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AEQ-FX-hY0">
<rect key="frame" x="100" y="168" width="385" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" selectable="YES" title="Please enter a local administrator password to reset the user's account." id="qqZ-3u-MDh">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3Cv-XF-qcP">
<rect key="frame" x="100" y="79" width="66" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Password:" id="uze-MC-XH3">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<secureTextField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Vej-yJ-L7m">
<rect key="frame" x="172" y="76" width="309" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="yFQ-uv-jJr">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
</secureTextFieldCell>
</secureTextField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lz5-lN-SaL">
<rect key="frame" x="421" y="13" width="69" height="32"/>
<buttonCell key="cell" type="push" title="Reset" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="H7H-CH-T4d">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
<connections>
<action selector="adminResetButtonPressed:" target="-2" id="NkZ-to-YVx"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c3P-E7-EL1">
<rect key="frame" x="347" y="13" width="76" height="32"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fkE-3E-eCB">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="adminCancelButtonPressed:" target="-2" id="4Uu-S8-IJk"/>
</connections>
</button>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dRz-I7-gTV">
<rect key="frame" x="94" y="106" width="70" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Username:" id="GRh-vK-MaB">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="A7r-Vp-fPL">
<rect key="frame" x="170" y="103" width="311" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="dGW-6n-oBR">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="Lz5-lN-SaL" firstAttribute="leading" secondItem="c3P-E7-EL1" secondAttribute="trailing" constant="12" symbolic="YES" id="C4o-sr-KbQ"/>
<constraint firstAttribute="bottom" secondItem="c3P-E7-EL1" secondAttribute="bottom" constant="20" symbolic="YES" id="J8P-p3-zsV"/>
<constraint firstAttribute="bottom" secondItem="Lz5-lN-SaL" secondAttribute="bottom" constant="20" symbolic="YES" id="UIg-q7-AP7"/>
<constraint firstAttribute="trailing" secondItem="Lz5-lN-SaL" secondAttribute="trailing" constant="20" symbolic="YES" id="Uil-qM-WHE"/>
</constraints>
</view>
<connections>
<outlet property="delegate" destination="-2" id="oG5-CP-lwV"/>
</connections>
<point key="canvasLocation" x="79.5" y="-85.5"/>
</window>
</objects>
<resources>
<image name="NSApplicationIcon" width="32" height="32"/>
<image name="icon_128x128" width="128" height="128"/>
</resources>
</document>

0 comments on commit 32b118f

Please sign in to comment.