feat: add oauth token validity verification

This commit is contained in:
2024-11-08 12:03:52 +01:00
parent d6e7791cb4
commit bd20895306
12 changed files with 326 additions and 119 deletions

View File

@@ -10,6 +10,7 @@ You may get a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
*/
import (
"net/url"
"os"
"strconv"
"strings"
@@ -96,3 +97,11 @@ func ParseRoutePath(path, blockedPath string) string {
return basePath + blockedPath
}
}
func UrlParsePath(uri string) string {
parse, err := url.Parse(uri)
if err != nil {
return ""
}
return parse.Path
}