OnConnected added
This commit is contained in:
parent
59ed7df624
commit
c526faeb1e
|
@ -33,7 +33,12 @@ type serverHandlers struct {
|
|||
cfg config.Configurator
|
||||
}
|
||||
|
||||
func (h *serverHandlers) OnConnection(soc ogw.Socket) {
|
||||
func (h *serverHandlers) OnConnection(ctx *fasthttp.RequestCtx) bool {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (h *serverHandlers) OnConnected(soc ogw.Socket) {
|
||||
// tokenString := string(soc.Conn().Headers().Cookie("AuthToken"))
|
||||
tokenString := "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJvdmVyRmxvdyIsImlhdCI6MTUwNDU5NTExOSwiZXhwIjoxNTM2MTMxMTE5LCJhdWQiOiJ3d3cub3ZlcmZsb3cuY2xvdWQiLCJzdWIiOiJvdmVyZmxvd0Bsb2FmbGUuY29tIn0.-WQi3OykPlJ9x8RcZGhWXEtGw4GhU6wmyJ_AWh2rMeUatQylfPzvmum2Xfp6pwKLMmcP76XoDPNyq06i7RKWNQ"
|
||||
token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user