-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Full Queue Developer
committed
Feb 7, 2023
1 parent
eb83e76
commit c84151a
Showing
7 changed files
with
47 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
Sources/ShXcrun/Altool/Credential/AltoolCredential.api(keyID,issuerID).swift
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...s/ShXcrun/Altool/Credential/AltoolCredential.password(username,environmentVariable).swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
public struct ApiKeyCredential: AltoolCredential { | ||
|
||
let keyID: String | ||
let issuerID: String | ||
|
||
public init(keyID: String, issuerID: String) { | ||
self.keyID = keyID | ||
self.issuerID = issuerID | ||
} | ||
|
||
public var serialized: String { | ||
"--apiKey $SH_XCRUN_ALTOOL_API_KEY_ID --apiIssuer $SH_XCRUN_ALTOOL_API_ISSUER_ID" | ||
} | ||
|
||
public var environment: [String: String] { | ||
[ | ||
"SH_XCRUN_ALTOOL_API_KEY_ID": keyID, | ||
"SH_XCRUN_ALTOOL_API_ISSUER_ID": issuerID, | ||
] | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Sources/ShXcrun/Altool/Credential/EnvironmentVariablePasswordCredential.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
public struct EnvironmentVariablePasswordCredential: AltoolCredential { | ||
|
||
let username: String | ||
let environmentVariable: String | ||
|
||
public init(username: String, environmentVariable: String) { | ||
self.username = username | ||
self.environmentVariable = environmentVariable | ||
} | ||
|
||
public var serialized: String { | ||
"-u \(username) -p @env:\(environmentVariable)" | ||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
...dential.password(username,keychain).swift → ...edential/KeychainPasswordCredential.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
...dential.password(username,password).swift → ...redential/LiteralPasswordCredential.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters