20 lines
455 B
Go
20 lines
455 B
Go
|
package authorizationserver
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func introspectionEndpoint(rw http.ResponseWriter, req *http.Request) {
|
||
|
ctx := req.Context()
|
||
|
mySessionData := newSession("", req)
|
||
|
ir, err := oauth2.NewIntrospectionRequest(ctx, req, mySessionData)
|
||
|
if err != nil {
|
||
|
log.Printf("Error occurred in NewIntrospectionRequest: %+v", err)
|
||
|
oauth2.WriteIntrospectionError(ctx, rw, err)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
oauth2.WriteIntrospectionResponse(ctx, rw, ir)
|
||
|
}
|