feat: add token endpoint

This commit is contained in:
Lakhan Samani
2022-03-04 12:56:11 +05:30
parent 2946428ab8
commit 0787a3b494
4 changed files with 159 additions and 14 deletions

View File

@@ -2,6 +2,7 @@ package cookie
import (
"net/http"
"net/url"
"github.com/authorizerdev/authorizer/server/constants"
"github.com/authorizerdev/authorizer/server/envstore"
@@ -56,5 +57,9 @@ func GetSession(gc *gin.Context) (string, error) {
}
}
return cookie.Value, nil
decodedValue, err := url.PathUnescape(cookie.Value)
if err != nil {
return "", err
}
return decodedValue, nil
}