rdpgw/security/simple.go
2020-07-21 12:52:25 +02:00

21 lines
No EOL
377 B
Go

package security
import (
"github.com/bolkedebruin/rdpgw/protocol"
"github.com/patrickmn/go-cache"
"log"
)
type Config struct {
Store *cache.Cache
}
func (c *Config) VerifyPAAToken(s *protocol.SessionInfo, token string) (bool, error) {
_, found := c.Store.Get(token)
if !found {
log.Printf("PAA Token %s not found", token)
return false, nil
}
return true, nil
}