bsky.auth
Atproto authenticator
License:
BSL-1.0
- struct
LoginInfo
; - Login information
- string
identifier
; - string
password
;
- struct
SessionInfo
; - Session information
- struct
DidDoc
;
DidDocdidDoc
; -
- string[]
atContext
; - string
id
; - string[]
alsoKnownAs
; - struct
VerificationMethod
;
VerificationMethod[]verificationMethod
; -
- string
id
; - string
type
; - string
contoroller
; - string
publicKeyMultibase
;
- struct
Service
;
Service[]service
; -
- string
id
; - string
type
; - string
serviceEndpoint
;
- @safe void
opAssign
(in DidDoc lhs);
- string
handle
; - string
did
; - string
accessJwt
; - string
refreshJwt
; - string
email
; - bool
emailConfirmed
; - bool
active
; - @safe void
opAssign
(in SessionInfo lhs); - static @safe SessionInfo
fromJsonString
(string json);
static @safe SessionInfofromJson
(JSONValue json); - const @safe JSONValue
toJson
();
const @safe stringtoJsonString
();
- class
AtprotoAuth
; - Bluesky authenticator
- @safe this(Client = CurlHttpClient!())(string endpoint = "https://bsky.social", Client client = new Client);
@safe this(Client : HttpClientBase)(string endpoint = "https://bsky.social", Client client);
shared @safe this(Client = CurlHttpClient!())(string endpoint = "https://bsky.social", Client client = new Client);
shared @trusted this(Client : HttpClientBase)(string endpoint = "https://bsky.social", Client client); - Constructor
- @trusted void
createSession
(LoginInfo info);
shared @trusted voidcreateSession
(LoginInfo info);
@safe voidcreateSession
(string id, string password);
shared @trusted voidcreateSession
(string id, string password); createSession
API- @trusted void
refreshSession
();
shared voidrefreshSession
(); refreshSession
API- @trusted void
deleteSession
();
shared @trusted voiddeleteSession
(); deleteSession
API- enum
UpdateStrategy
: int; - Update strategy
force
expired
before5min
herf
- @trusted void
updateSession
();
shared @trusted voidupdateSession
();
@trusted voidupdateSession
(UpdateStrategy strategy);
shared @trusted voidupdateSession
(UpdateStrategy strategy); - Update session information
- @trusted void
restoreSession
(in SessionInfo sessionInfo);
shared @trusted voidrestoreSession
(in SessionInfo sessionInfo);
@trusted voidrestoreSessionFromTokens
(string accessJwt, string refreshJwt);
shared @trusted voidrestoreSessionFromTokens
(string accessJwt, string refreshJwt);
@trusted voidrestoreSessionFromRefreshToken
(string refreshJwt);
shared @trusted voidrestoreSessionFromRefreshToken
(string refreshJwt); - refreshSession API
- const @trusted const(SessionInfo)
storeSession
();
shared const @trusted const(SessionInfo)storeSession
();
const @trusted stringstoreSessionOnlyRefreshToken
();
shared const @trusted stringstoreSessionOnlyRefreshToken
();
const @trusted Tuple!(string, "accessJwt", string, "refreshJwt")storeSessionOnlyToken
();
shared const @trusted Tuple!(string, "accessJwt", string, "refreshJwt")storeSessionOnlyToken
(); - refreshSession API
- const @trusted bool
available
();
shared const @trusted boolavailable
(); - Available
- const @trusted string
bearer
();
shared const @trusted stringbearer
(); - createSession API
- const @trusted string
did
();
shared const @trusted stringdid
(); - createSession API
- const @safe SysTime
expire
();
shared const @trusted SysTimeexpire
();
const @safe SysTimerefreshExpire
();
shared const @trusted SysTimerefreshExpire
(); - Expire duration of auth