kotlin-client.libraries.jvm-ktor.auth.OAuth.kt.mustache Maven / Gradle / Ivy
package {{packageName}}.auth
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class OAuth : Authentication {
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}var accessToken: String? = null
override fun apply(query: MutableMap>, headers: MutableMap) {
val token: String = accessToken ?: return
headers["Authorization"] = "Bearer $token"
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy