Returning the internal server so it can be used outside

My use case is that we have legacy auth that will be checked first then if that fails we will use the OAuth server.
So then I can't really use the HandleTokenVerify, so want to be able to use the `gserver.ValidationBearerToken` directly
This commit is contained in:
Patrik 2018-07-23 20:10:17 +02:00 committed by GitHub
parent 2bab9f178a
commit 934c978a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -13,11 +13,12 @@ var (
)
// InitServer Initialize the service
func InitServer(manager oauth2.Manager) {
func InitServer(manager oauth2.Manager) *server.Server {
if err := manager.CheckInterface(); err != nil {
panic(err)
}
gServer = server.NewDefaultServer(manager)
return gServer
}
// HandleAuthorizeRequest the authorization request handling