All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tencent.devops.common.client.ClientTokenService.kt Maven / Gradle / Ivy

There is a newer version: 3.1.0-rc.4
Show newest version
package com.tencent.devops.common.client

import com.tencent.devops.common.redis.RedisOperation
import com.tencent.devops.common.service.BkTag
import org.springframework.beans.factory.annotation.Value

class ClientTokenService(
    val redisOperation: RedisOperation,
    val bkTag: BkTag
) {
    @Value("\${auth.token:#{null}}")
    private val systemToken: String = ""

    fun getSystemToken(): String {
        return systemToken
    }

    fun checkToken(token: String): Boolean {
        return systemToken == token
    }

    companion object {
        const val DEFAULT_APP = "ci"
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy