JubeatPlus 3.9.11
Loading...
Searching...
No Matches
EditorIDManager Class Reference

Holds the editor identifier and its passphrase as keychain items. More...

#include <EditorIDManager.h>

Inheritance diagram for EditorIDManager:
Collaboration diagram for EditorIDManager:

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.

Detailed Description

Holds the editor identifier and its passphrase as keychain items.

Method Documentation

◆ cancel

- (void) cancel

Cancels the in-flight provisioning download.

Ghidra address:
0x1d27f8

◆ createAddQuery:

- (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.

Parameters
keyThe account name.
Returns
The add-query dictionary.
Ghidra address:
0x1d28dc
Ghidra address:
0x1d28dc

◆ createAddQueryG:

+ (NSDictionary *) createAddQueryG: (id) key

Builds the keychain add query for an account.

Identical to -createAddQuery: .

Parameters
keyThe account name.
Returns
The add-query dictionary.
Ghidra address:
0x1d3538
Ghidra address:
0x1d3538

◆ deleteKeychain

+ (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.

Ghidra address:
0x1d325c
Ghidra address:
0x1d325c

◆ deleteKeychainString:

+ (void) deleteKeychainString: (id) key

Deletes the generic-password keychain item for an account.

Parameters
keyThe account name.
Ghidra address:
0x1d31ac
Ghidra address:
0x1d31ac

◆ getEditorIDKey

+ (NSString *) getEditorIDKey

The keychain account for the editor identifier, the constant "EditorUniqueID".

Returns
The keychain account name "EditorUniqueID" .
Ghidra address:
0x1d3034
Ghidra address:
0x1d3034

◆ getEditorPassKey

+ (NSString *) getEditorPassKey

The keychain account for the editor passphrase, the constant "EditorPassword".

Returns
The keychain account name "EditorPassword" .
Ghidra address:
0x1d3060
Ghidra address:
0x1d3060

◆ getKeyQuery:

+ (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.

Parameters
keyThe account name.
Returns
The query dictionary.
Ghidra address:
0x1d2ec4
Ghidra address:
0x1d2ec4

◆ getKeyString:

+ (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.

Ghidra address:
0x1d33c4
Ghidra address:
0x1d33c4

◆ initWithDelegate:

- (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.

Parameters
delegateThe object told how the download finished.
Returns
The initialised manager.
Ghidra address:
0x1d272c

◆ jubeatLabAccessError:

- (void) jubeatLabAccessError: (nullable id) access

jubeatLab callback sent when the download fails; tells the delegate.

Parameters
accessThe jubeatLab client.
Ghidra address:
0x1d2814

◆ jubeatLabAccessFinished:

- (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.

Parameters
accessThe jubeatLab client.
Ghidra address:
0x1d2a5c

◆ jubeatLabAccessProceed:

- (void) jubeatLabAccessProceed: (nullable id) access

jubeatLab callback sent as the download proceeds.

Does nothing.

Parameters
accessThe jubeatLab client.
Ghidra address:
0x1d2810

◆ printKeychain

+ (void) printKeychain

Debugging hook that prints the keychain.

Does nothing in the shipped build.

Ghidra address:
0x1d3534
Ghidra address:
0x1d3534

◆ replaceKeyChain:

+ (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: .

Parameters
responseThe provisioning response dictionary.
Ghidra address:
0x1d38dc
Ghidra address:
0x1d38dc

◆ replaceKeyChain:pass:

+ (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.

Parameters
editorIDThe new editor identifier.
passThe new passphrase.
Ghidra address:
0x1d39d4
Ghidra address:
0x1d39d4
Ghidra address:
0x1d3b68

◆ setKeyChain:passwd:

+ (void) setKeyChain: (id) editorID
passwd: (id) passwd 

Writes the editor identifier and passphrase into the keychain.

Parameters
editorIDThe editor identifier.
passwdThe passphrase.
Ghidra address:
0x1d36b8
Ghidra address:
0x1d36b8

Property Documentation

◆ isExistEditorID

- (BOOL) isExistEditorID
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.

Ghidra address:
0x1d308c
Ghidra address:
0x1d308c

The documentation for this class was generated from the following files: