mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-20 20:01:31 +00:00
Withdrew the comments.
This commit is contained in:
parent
4af3c6ed8c
commit
75d7ff3905
@ -2,9 +2,6 @@
|
||||
|
||||
import { AuthChecker } from 'type-graphql'
|
||||
|
||||
import CONFIG from '../../config'
|
||||
import { apiGet } from '../../apis/HttpRequest'
|
||||
|
||||
import decode from '../../jwt/decode'
|
||||
import encode from '../../jwt/encode'
|
||||
|
||||
@ -13,15 +10,9 @@ const isAuthorized: AuthChecker<any> = async (
|
||||
) => {
|
||||
if (context.token) {
|
||||
const decoded = decode(context.token)
|
||||
// if (decoded.sessionId && decoded.sessionId !== 0) {
|
||||
// const result = await apiGet(
|
||||
// `${CONFIG.LOGIN_API_URL}checkSessionState?session_id=${decoded.sessionId}`,
|
||||
// )
|
||||
// context.sessionId = decoded.sessionId
|
||||
context.pubKey = decoded.pubKey
|
||||
context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) })
|
||||
return true
|
||||
// }
|
||||
}
|
||||
throw new Error('401 Unauthorized')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user