Add authentication
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
package top.fatweb.api
|
||||
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
import top.fatweb.api.constants.SecurityConstants
|
||||
import java.security.MessageDigest
|
||||
import java.util.*
|
||||
import top.fatweb.api.constant.SecurityConstants
|
||||
|
||||
@SpringBootTest
|
||||
class FatWebApiApplicationTests {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
SecurityConstants.jwtKey
|
||||
}
|
||||
|
||||
@Test
|
||||
fun removePrefixTest() {
|
||||
assertEquals("12312", "Bearer 12312".removePrefix(SecurityConstants.tokenPrefix))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user