From b59b3b718023412543195ae4b57cbbe1c176b65f Mon Sep 17 00:00:00 2001 From: EkeMinusYou Date: Mon, 30 Jan 2023 14:12:30 +0900 Subject: [PATCH] IntrospectToken: fix response type --- authentication/authentication_client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/authentication/authentication_client.go b/authentication/authentication_client.go index 585c0ee..18fc47f 100644 --- a/authentication/authentication_client.go +++ b/authentication/authentication_client.go @@ -5,10 +5,11 @@ import ( "encoding/json" "errors" "fmt" + "strings" + "github.com/Authing/authing-golang-sdk/v3/constant" "github.com/Authing/authing-golang-sdk/v3/dto" "github.com/Authing/authing-golang-sdk/v3/util" - "strings" keyfunc "github.com/MicahParks/compatibility-keyfunc" "github.com/dgrijalva/jwt-go" @@ -332,7 +333,7 @@ func (client *AuthenticationClient) GetNewAccessTokenByRefreshToken(refreshToken return string(resp.Body), err } -func (client *AuthenticationClient) IntrospectToken(token string) (*dto.IntrospectTokenResult, error) { +func (client *AuthenticationClient) IntrospectToken(token string) (*dto.TokenIntrospectResponse, error) { url := client.options.AppHost + fmt.Sprintf("/%s/token/introspection", client.options.Protocol) header := map[string]string{ "Content-Type": "application/x-www-form-urlencoded", @@ -357,7 +358,7 @@ func (client *AuthenticationClient) IntrospectToken(token string) (*dto.Introspe ReqDto: body, }) println(string(resp.Body)) - var response dto.IntrospectTokenResult + var response dto.TokenIntrospectResponse if err != nil { return nil, err }