commonMain.com.atproto.server.getServiceAuth.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky-jvm Show documentation
Show all versions of bluesky-jvm Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package com.atproto.server
import kotlin.Any
import kotlin.Long
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlinx.collections.immutable.toImmutableList
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.Did
import sh.christian.ozone.api.Nsid
import sh.christian.ozone.api.model.ReadOnlyList
/**
* @param aud The DID of the service that the token will be used to authenticate with
* @param exp The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the
* future. The service may enforce certain time bounds on tokens depending on the requested scope.
* @param lxm Lexicon (XRPC) method to bind the requested token to
*/
@Serializable
public data class GetServiceAuthQueryParams(
/**
* The DID of the service that the token will be used to authenticate with
*/
public val aud: Did,
/**
* The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The
* service may enforce certain time bounds on tokens depending on the requested scope.
*/
public val exp: Long? = null,
/**
* Lexicon (XRPC) method to bind the requested token to
*/
public val lxm: Nsid? = null,
) {
public fun asList(): ReadOnlyList> = buildList {
add("aud" to aud)
add("exp" to exp)
add("lxm" to lxm)
}.toImmutableList()
}
@Serializable
public data class GetServiceAuthResponse(
public val token: String,
)