Documentation
¶
Index ¶
- func ClearIrisSessions()
- func LoadIrisCookies() (http.CookieJar, error)
- func SaveIrisCookies(appleID string, jar http.CookieJar) error
- type AuthState
- type Client
- func (c *Client) CookieJar() http.CookieJar
- func (c *Client) FetchServiceKey(ctx context.Context) error
- func (c *Client) RequestSMSCode(ctx context.Context, phoneID int) error
- func (c *Client) SignIn(ctx context.Context, appleID, password string) (*AuthState, error)
- func (c *Client) TrustSession(ctx context.Context) error
- func (c *Client) VerifyDeviceCode(ctx context.Context, code string) error
- func (c *Client) VerifySMSCode(ctx context.Context, code string, phoneID int) error
- type OnboardingResult
- type TrustedPhone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearIrisSessions ¶
func ClearIrisSessions()
ClearIrisSessions removes all stored iris session files.
func LoadIrisCookies ¶
LoadIrisCookies restores saved iris session cookies into a cookie jar. Returns the jar or an error if no session is available.
Types ¶
type AuthState ¶
type AuthState struct {
TrustedPhones []TrustedPhone
CodeLength int
HasTrustedDevices bool
}
AuthState holds the 2FA state after SRP authentication.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles Apple IDMSA SRP authentication and 2FA.
func (*Client) FetchServiceKey ¶
FetchServiceKey fetches the Apple auth service key from Olympus.
func (*Client) RequestSMSCode ¶
RequestSMSCode sends an SMS verification code to the specified phone.
func (*Client) SignIn ¶
SignIn performs SRP authentication with Apple ID. Returns an AuthState if 2FA is required, nil if sign-in completed directly.
func (*Client) TrustSession ¶
TrustSession establishes a trusted session after 2FA verification.
func (*Client) VerifyDeviceCode ¶
VerifyDeviceCode verifies a trusted device OTP code.
type OnboardingResult ¶
OnboardingResult holds the outcome of the full onboarding flow.
func RunOnboarding ¶
RunOnboarding executes the full onboarding flow after web authentication:
- Use session cookies from IDMSA auth
- GET /iris/v1/contentProviders -> issuer ID + team name
- POST /iris/v1/apiKeys -> key ID + .p8 content
- asc auth login -> register the key for CLI usage
type TrustedPhone ¶
type TrustedPhone struct {
ID int `json:"id"`
NumberWithDialCode string `json:"numberWithDialCode"`
}
TrustedPhone represents a phone number for SMS 2FA.