|
JubeatPlus 3.9.11
|
Holds the editor identifier and its passphrase as keychain items. More...
#include <EditorIDManager.h>


Instance Methods | |
| (instancetype) | - initWithDelegate: |
| Starts a jubeatLab provisioning download that will write the editor keychain items. | |
| (void) | - cancel |
| Cancels the in-flight provisioning download. | |
| (NSDictionary *) | - createAddQuery: |
| Builds the keychain add query for an account. | |
| (void) | - jubeatLabAccessProceed: |
| jubeatLab callback sent as the download proceeds. | |
| (void) | - jubeatLabAccessError: |
| jubeatLab callback sent when the download fails; tells the delegate. | |
| (void) | - jubeatLabAccessFinished: |
| jubeatLab callback sent when the download finishes; writes the keychain on success. | |
Class Methods | |
| (NSString *) | + getEditorIDKey |
The keychain account for the editor identifier, the constant "EditorUniqueID". | |
| (NSString *) | + getEditorPassKey |
The keychain account for the editor passphrase, the constant "EditorPassword". | |
| (NSDictionary *) | + getKeyQuery: |
| Builds the keychain lookup query for an account. | |
| (void) | + deleteKeychain |
| Removes the editor keychain entries that are present. | |
| (void) | + deleteKeychainString: |
| Deletes the generic-password keychain item for an account. | |
| (nullable NSString *) | + getKeyString: |
| Reads the keychain payload for an account and decodes it as a UTF-8 string. | |
| (NSDictionary *) | + createAddQueryG: |
| Builds the keychain add query for an account. | |
| (void) | + setKeyChain:passwd: |
| Writes the editor identifier and passphrase into the keychain. | |
| (void) | + replaceKeyChain: |
| Replaces the keychain from a provisioning response, when its status marks a switch. | |
| (void) | + replaceKeyChain:pass: |
| Switches the editor account: rewrites the keychain and clears the derived session state. | |
| (void) | + printKeychain |
| Debugging hook that prints the keychain. | |
Properties | |
| BOOL | isExistEditorID |
| Whether both the editor identifier and its passphrase are present in the keychain. | |
Holds the editor identifier and its passphrase as keychain items.
| - (void) cancel |
Cancels the in-flight provisioning download.
| - (NSDictionary *) createAddQuery: | (id) | key |
Builds the keychain add query for an account.
A generic-password entry scoped to the bundle identifier with an empty label and description, set to be accessible after first unlock.
| key | The account name. |
| + (NSDictionary *) createAddQueryG: | (id) | key |
Builds the keychain add query for an account.
Identical to -createAddQuery: .
| key | The account name. |
| + (void) deleteKeychain |
Removes the editor keychain entries that are present.
Looks up the identifier and the passphrase in turn and deletes each one only when the lookup succeeds, so an absent entry is left alone rather than delete-attempted.
| + (void) deleteKeychainString: | (id) | key |
Deletes the generic-password keychain item for an account.
| key | The account name. |
| + (NSString *) getEditorIDKey |
The keychain account for the editor identifier, the constant "EditorUniqueID".
"EditorUniqueID" . | + (NSString *) getEditorPassKey |
The keychain account for the editor passphrase, the constant "EditorPassword".
"EditorPassword" . | + (NSDictionary *) getKeyQuery: | (id) | key |
Builds the keychain lookup query for an account.
A generic-password query scoped to the bundle identifier that asks for the item's attributes and caps the match at one result.
| key | The account name. |
| + (NSString *) getKeyString: | (id) | key |
Reads the keychain payload for an account and decodes it as a UTF-8 string.
Returns nil when either keychain lookup fails. Like -[JubeatAppDelegate musicListKey], the first query asks only for attributes and those attributes are then reused as the basis of a second query that asks for the payload.
| - (instancetype) initWithDelegate: | (nullable id< EditorIDManagerDelegate >) | delegate |
Starts a jubeatLab provisioning download that will write the editor keychain items.
Stores the delegate weakly, builds a jubeatLabAccess client bound to this manager, and starts it. The callbacks below report the outcome.
| delegate | The object told how the download finished. |
| - (void) jubeatLabAccessError: | (nullable id) | access |
jubeatLab callback sent when the download fails; tells the delegate.
| access | The jubeatLab client. |
| - (void) jubeatLabAccessFinished: | (nullable id) | access |
jubeatLab callback sent when the download finishes; writes the keychain on success.
Parses the JSON for Status , UserID , and Passwd . When all are present and the status is zero it writes both keychain items, refreshes the user agent, and tells the delegate it succeeded; otherwise it reports the failure with the server's MsgUser text.
| access | The jubeatLab client. |
| - (void) jubeatLabAccessProceed: | (nullable id) | access |
jubeatLab callback sent as the download proceeds.
Does nothing.
| access | The jubeatLab client. |
| + (void) printKeychain |
Debugging hook that prints the keychain.
Does nothing in the shipped build.
| + (void) replaceKeyChain: | (id) | response |
Replaces the keychain from a provisioning response, when its status marks a switch.
Reads Status , UserID , and Passwd ; only when the status is 0x75DA does it hand the identifier and passphrase to +replaceKeyChain:pass: .
| response | The provisioning response dictionary. |
| + (void) replaceKeyChain: | (id) | editorID | |
| pass: | (id) | pass |
Switches the editor account: rewrites the keychain and clears the derived session state.
When both arguments are present it deletes the keychain, writes the new pair, refreshes the user agent, resets ChallengeStatus , and clears every stored HTTP cookie.
| editorID | The new editor identifier. |
| pass | The new passphrase. |
| + (void) setKeyChain: | (id) | editorID | |
| passwd: | (id) | passwd |
Writes the editor identifier and passphrase into the keychain.
| editorID | The editor identifier. |
| passwd | The passphrase. |
|
readnonatomicassign |
Whether both the editor identifier and its passphrase are present in the keychain.
Returns YES only when both lookups succeed. When either reports errSecItemNotFound it wipes the keychain entries and returns NO, so a half-provisioned device is cleaned up rather than left in that state.