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 Show documentation
Show all versions of bluesky 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 kotlin.collections.List
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.Did
import sh.christian.ozone.api.Nsid
/**
* @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(): List> = buildList {
add("aud" to aud)
add("exp" to exp)
add("lxm" to lxm)
}
}
@Serializable
public data class GetServiceAuthResponse(
public val token: String,
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy