mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
22 lines
676 B
Go
22 lines
676 B
Go
package oasimpl
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
// HandleIntrospectionRequest handles the OAuth2 query to determine the active state of an OAuth 2.0 token and
|
|
// to determine meta-information about this token
|
|
func (s *OAuth2ServiceImpl) HandleIntrospectionRequest(rw http.ResponseWriter, req *http.Request) {
|
|
ctx := req.Context()
|
|
currentOAuthSessionData := NewAuthSession()
|
|
ir, err := s.oauthProvider.NewIntrospectionRequest(ctx, req, currentOAuthSessionData)
|
|
if err != nil {
|
|
log.Printf("Error occurred in NewIntrospectionRequest: %+v", err)
|
|
s.oauthProvider.WriteIntrospectionError(ctx, rw, err)
|
|
return
|
|
}
|
|
|
|
s.oauthProvider.WriteIntrospectionResponse(ctx, rw, ir)
|
|
}
|