Skip to content

Commit d64f587

Browse files
committed
wip
1 parent 1bbff99 commit d64f587

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

client/challenges.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import (
77
"strings"
88
)
99

10-
type VerificationMethod string
11-
12-
type SmsChannel string
13-
1410
func (c Client) Challenge(req ChallengeRequest) (ChallengeResponse, error) {
1511
var resp ChallengeResponse
1612
body, err := json.Marshal(req)

client/sessions.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package client
22

33
import (
44
"encoding/json"
5-
"fmt"
65
"strings"
76
)
87

@@ -64,7 +63,10 @@ func (c Client) RevokeSession(req RevokeSessionRequest) error {
6463
}
6564

6665
func (c Client) RevokeUserSessions(req RevokeUserSessionsRequest) error {
67-
// No request body, userId is in the path
68-
_, err := c.post(fmt.Sprintf("/users/%s/sessions/revoke", req.UserId), nil)
66+
body, err := json.Marshal(req)
67+
if err != nil {
68+
return err
69+
}
70+
_, err = c.post("/sessions/user/revoke", strings.NewReader(string(body)))
6971
return err
7072
}

0 commit comments

Comments
 (0)