We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40d6049 commit 6a8038dCopy full SHA for 6a8038d
1 file changed
app/src/main/java/com/texthip/thip/utils/auth/AuthInterceptor.kt
@@ -0,0 +1,18 @@
1
+package com.texthip.thip.utils.auth
2
+
3
+import okhttp3.Interceptor
4
+import okhttp3.Response
5
+import javax.inject.Inject
6
7
+class AuthInterceptor @Inject constructor() : Interceptor {
8
+ override fun intercept(chain: Interceptor.Chain): Response {
9
+ val request = chain.request().newBuilder()
10
11
+ request
12
+ .addHeader(
13
+ "Authorization",
14
+ "Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjEsImlhdCI6MTc1NDI4MjMzNiwiZXhwIjoxNzU2ODc0MzM2fQ.NG_xDSdh8A6egIX2EAFtsqDO4lmFphTzqgzHC-r8eXY"
15
+ )
16
+ return chain.proceed(request.build())
17
+ }
18
+}
0 commit comments