Skip to content

Commit

Permalink
Returning the internal server so it can be used outside
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Tazer authored Jul 23, 2018
1 parent 2bab9f1 commit 934c978
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 934c978

Please sign in to comment.