OzoneTool.fromSession constructor
OzoneTool.fromSession(})
Returns the new instance of OzoneTool.
This builds a fresh atp.ATProto, and therefore a fresh
core.ServiceContext carrying its own copy of session. When the same
account also needs another client, build the atp.ATProto once and pass
it to OzoneTool.fromAtproto instead — two contexts each holding a copy
of one session race to spend a single-use refresh token.
The labeler proxy header built from ozoneDid is added to the context
this OzoneTool sends through, not to the one atproto exposes:
com.atproto.* calls made through atproto are not proxied to the ozone
service.
Implementation
factory OzoneTool.fromSession(
final core.Session session, {
final String? ozoneDid,
final Map<String, String>? headers,
final core.Protocol? protocol,
final String? service,
final String? relayService,
final Duration? timeout,
final core.RetryStrategy? retryConfig,
final core.GetClient? getClient,
final core.PostClient? postClient,
}) => _OzoneTool.fromAtproto(
atp.ATProto.fromSession(
session,
headers: headers,
protocol: protocol,
service: service,
relayService: relayService,
timeout: timeout,
retryConfig: retryConfig,
getClient: getClient,
postClient: postClient,
),
ozoneDid: ozoneDid,
);