mirror of
https://github.com/aljazceru/khatru.git
synced 2026-01-09 16:34:23 +01:00
14 lines
264 B
Go
14 lines
264 B
Go
package relayer
|
|
|
|
import "context"
|
|
|
|
const AUTH_CONTEXT_KEY = iota
|
|
|
|
func GetAuthStatus(ctx context.Context) (pubkey string, ok bool) {
|
|
authedPubkey := ctx.Value(AUTH_CONTEXT_KEY)
|
|
if authedPubkey == nil {
|
|
return "", false
|
|
}
|
|
return authedPubkey.(string), true
|
|
}
|