Skip to content

Commit

Permalink
update validateToken and verifyTOTP params
Browse files Browse the repository at this point in the history
  • Loading branch information
altaywtf committed Mar 1, 2022
1 parent 0fd63fe commit 35c567c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/resources/Auth/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,20 @@ export default class Auth {
return this.client.post<{}>('/oauth/clients/delete-all')
}

public ValidateToken() {
return this.client.get<IValidateTokenResponse>('/oauth2/validate')
public ValidateToken(token: string) {
return this.client.get<IValidateTokenResponse>('/oauth2/validate', {
params: { oauth_token: token },
})
}

public GenerateTOTP() {
return this.client.post<IGenerateTOTPResponse>('/two_factor/generate/totp')
}

public VerifyTOTP(totp: string) {
public VerifyTOTP(twoFactorScopedToken: string, totp: string) {
return this.client.post<IVerifyTOTPResponse>('/two_factor/verify/totp', {
data: {
totp,
},
params: { oauth_token: twoFactorScopedToken },
data: { totp },
})
}
}

0 comments on commit 35c567c

Please sign in to comment.