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:
parent
2bab9f178a
commit
934c978a2c
@ -13,11 +13,12 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// InitServer Initialize the service
|
// InitServer Initialize the service
|
||||||
func InitServer(manager oauth2.Manager) {
|
func InitServer(manager oauth2.Manager) *server.Server {
|
||||||
if err := manager.CheckInterface(); err != nil {
|
if err := manager.CheckInterface(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
gServer = server.NewDefaultServer(manager)
|
gServer = server.NewDefaultServer(manager)
|
||||||
|
return gServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleAuthorizeRequest the authorization request handling
|
// HandleAuthorizeRequest the authorization request handling
|
||||||
|
Loading…
Reference in New Issue
Block a user