Files
jellyfin-plugin-floatplane/doc/research/reference-sources/fn_ios_AuthModels.swift
claude 9e33a343ab
Some checks failed
release / build-release (push) Has been cancelled
Floatplane channel plugin for Jellyfin 10.10.x: browse, HLS proxy, cookie session, CI release
- IChannel: creators -> sub-channels -> video posts (public listing API, search mapped)
- IRequiresMediaInfoCallback -> signed proxy URLs; stream controller rewrites HLS so the
  AES-128 key is fetched server-side with the session cookie, segments stay on the CDN
- delivery/info cached per token lifetime and throttled (~2/min)
- config page: paste sails.sid + validate, extra creators, quality, search test
- scripts/package.sh -> plugin folder + zip + md5 + manifest.json; Gitea release workflow
- research docs, HAR analysis (HAR itself gitignored), install-pi5.sh

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 09:42:27 +01:00

112 lines
2.3 KiB
Swift

//
// AuthModels.swift
// FloatNative
//
// Created by Claude on 2025-10-08.
//
import Foundation
// MARK: - Login
struct LoginRequest: Codable {
let username: String
let password: String
let captchaToken: String?
}
// Using OpenAPI-generated models
typealias LoginResponse = AuthLoginV2Response
typealias User = UserModel // Basic user info (id, username, profileImage)
struct TwoFactorRequest: Codable {
let token: String
}
// MARK: - Captcha Info
struct CaptchaInfo: Codable {
let v2: CaptchaKeys
let v3: CaptchaKeys
}
struct CaptchaKeys: Codable {
let android: String
let ios: String
let web: String
}
// MARK: - User Activity
struct UserActivity: Codable {
let activity: [ActivityItem]
}
struct ActivityItem: Codable {
let time: Date
let comment: Comment?
let post: BlogPost?
}
// MARK: - Notification Settings
struct NotificationSetting: Codable {
let creator: String
let property: String
let newContent: NotificationChannel?
let contentEmail: NotificationChannel?
}
struct NotificationChannel: Codable {
let enabled: Bool
}
struct NotificationUpdateRequest: Codable {
let creator: String
let property: String
let newValue: Bool
}
// MARK: - OAuth
struct OAuthTokenResponse: Codable {
let accessToken: String
let expiresIn: Int
let refreshExpiresIn: Int
let refreshToken: String
let tokenType: String
let notBeforePolicy: Int
let sessionState: String
let scope: String
enum CodingKeys: String, CodingKey {
case accessToken = "access_token"
case expiresIn = "expires_in"
case refreshExpiresIn = "refresh_expires_in"
case refreshToken = "refresh_token"
case tokenType = "token_type"
case notBeforePolicy = "not-before-policy"
case sessionState = "session_state"
case scope
}
}
struct DeviceCodeResponse: Codable {
let deviceCode: String
let userCode: String
let verificationUri: String
let verificationUriComplete: String
let expiresIn: Int
let interval: Int
enum CodingKeys: String, CodingKey {
case deviceCode = "device_code"
case userCode = "user_code"
case verificationUri = "verification_uri"
case verificationUriComplete = "verification_uri_complete"
case expiresIn = "expires_in"
case interval
}
}