Peertube_auth.ClientPeerTube client with authentication.
This module provides a high-level client that handles authentication and session management for PeerTube API access.
val login_password :
sw:Eio.Switch.t ->
env:
< clock : _ Eio.Time.clock
; fs : Eio.Fs.dir_ty Eio.Path.t
; net : _ Eio.Net.t.. > ->
?requests_config:Requests.Cmd.config ->
?profile:string ->
server_url:string ->
username:string ->
password:string ->
unit ->
tlogin_password ~sw ~env ?requests_config ?profile ~server_url ~username ~password () authenticates with username and password using OAuth2 password grant.
The OAuth client credentials are automatically retrieved from the server. On success, the session is saved to disk.
val resume :
sw:Eio.Switch.t ->
env:
< clock : _ Eio.Time.clock
; fs : Eio.Fs.dir_ty Eio.Path.t
; net : _ Eio.Net.t.. > ->
?requests_config:Requests.Cmd.config ->
?profile:string ->
session:Session.t ->
unit ->
tresume ~sw ~env ?requests_config ?profile ~session () creates a client from an existing session.
val logout : t -> unitlogout t removes the saved session.
val client : t -> Peer_tube.tclient t returns the underlying PeerTube API client.
val profile : t -> string optionprofile t returns the profile name, if any.
val fs : t -> Eio.Fs.dir_ty Eio.Path.tfs t returns the filesystem.