Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntrospectToken: fix response type #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions authentication/authentication_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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
}
Expand Down