Skip to content

Commit

Permalink
changed identifier to all lower case; changed refresh to hours
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Jun 13, 2022
1 parent 74671af commit a46bc18
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Profile Manifest/com.twocanoes.xCreds.plist
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ A profile can consist of payloads with different version numbers. For example, c

<dict>
<key>pfm_name</key>
<string>refreshRate</string>
<string>refreshRateHours</string>
<key>pfm_type</key>
<string>string</string>
<key>pfm_title</key>
<string>Password Change Check Rate</string>
<key>pfm_description</key>
<string>Number of seconds for checking for password changes</string>
<string>Number of hours for checking for password changes. Default is 3 hours. Minimum is 1 hour.</string>

<!-- This value will be automatically set as the value until the user changes it. -->
<key>pfm_default</key>
Expand Down
2 changes: 1 addition & 1 deletion XCreds/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="xCreds Help" keyEquivalent="?" id="FKE-Sm-Kum">
<menuItem title="xcreds Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
</connections>
Expand Down
2 changes: 1 addition & 1 deletion XCreds/PrefKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
import Foundation

enum PrefKeys: String {
case clientID, clientSecret, discoveryURL, redirectURI, scopes, accessToken, idToken, refreshToken, tokenEndpoint, expirationDate, invalidToken, refreshRate, showDebug, verifyPassword, shouldShowQuit, shouldShowPreferencesOnStart
case clientID, clientSecret, discoveryURL, redirectURI, scopes, accessToken, idToken, refreshToken, tokenEndpoint, expirationDate, invalidToken, refreshRateHours, showDebug, verifyPassword, shouldShowQuit, shouldShowPreferencesOnStart
}
8 changes: 4 additions & 4 deletions XCreds/ScheduleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class ScheduleManager {
if let timer = timer, timer.isValid==true {
return
}
var rate = UserDefaults.standard.integer(forKey: PrefKeys.refreshRate.rawValue)
var rate = UserDefaults.standard.integer(forKey: PrefKeys.refreshRateHours.rawValue)

if rate < 3600 {
rate = 3600
if rate < 1 {
rate = 1
}
timer=Timer.scheduledTimer(withTimeInterval: TimeInterval(rate), repeats: true, block: { timer in
timer=Timer.scheduledTimer(withTimeInterval: TimeInterval(rate*60*60), repeats: true, block: { timer in
self.checkToken()
})
self.checkToken()
Expand Down
2 changes: 1 addition & 1 deletion XCreds/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class WebViewController: NSWindowController {
extension WebViewController: WKNavigationDelegate {

public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
print("WebDel:: Deciding Policy for: \(navigationAction.request.url?.absoluteString ?? "None")")
// print("WebDel:: Deciding Policy for: \(navigationAction.request.url?.absoluteString ?? "None")")

// if it's a POST let's see what we're posting...
if navigationAction.request.httpMethod == "POST" {
Expand Down
4 changes: 2 additions & 2 deletions XCreds/defaults.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<dict>
<key>redirectURI</key>
<string>xcreds:https://auth/</string>
<key>refreshRate</key>
<string>10800</string>
<key>refreshRateHours</key>
<string>3</string>
<key>showDebug</key>
<false/>
<key>verifyPassword</key>
Expand Down
8 changes: 4 additions & 4 deletions xCreds.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1268;
CURRENT_PROJECT_VERSION = 1269;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -402,7 +402,7 @@
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.xCreds;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.xcreds;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "XCreds/XCreds-Bridging-Header.h";
Expand All @@ -418,7 +418,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1268;
CURRENT_PROJECT_VERSION = 1269;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -431,7 +431,7 @@
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.xCreds;
PRODUCT_BUNDLE_IDENTIFIER = com.twocanoes.xcreds;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "XCreds/XCreds-Bridging-Header.h";
Expand Down
Binary file not shown.

0 comments on commit a46bc18

Please sign in to comment.