MCPcopy Index your code
hub / github.com/coder/coder / ChangePasswordWithOneTimePasscode

Method ChangePasswordWithOneTimePasscode

codersdk/users.go:930–942  ·  view source on GitHub ↗
(ctx context.Context, req ChangePasswordWithOneTimePasscodeRequest)

Source from the content-addressed store, hash-verified

928}
929
930func (c *Client) ChangePasswordWithOneTimePasscode(ctx context.Context, req ChangePasswordWithOneTimePasscodeRequest) error {
931 res, err := c.Request(ctx, http.MethodPost, "/api/v2/users/otp/change-password", req)
932 if err != nil {
933 return err
934 }
935 defer res.Body.Close()
936
937 if res.StatusCode != http.StatusNoContent {
938 return ReadBodyAsError(res)
939 }
940
941 return nil
942}
943
944// ConvertLoginType will send a request to convert the user from password
945// based authentication to oauth based. The response has the oauth state code

Callers 1

TestUserForgotPasswordFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1

TestUserForgotPasswordFunction · 0.64