Skip to content

Commit fb704e5

Browse files
Merge branch 'develop' of github.com:FusionAuth/go-client into lyle/ENG-3375/introspect-and-libs
2 parents da48925 + 0e9e746 commit fb704e5

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

build.savant

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* language governing permissions and limitations under the License.
1515
*/
1616

17-
project(group: "io.fusionauth", name: "go-client", version: "1.61.0", licenses: ["ApacheV2_0"]) {
17+
project(group: "io.fusionauth", name: "go-client", version: "1.62.0", licenses: ["ApacheV2_0"]) {
1818
workflow {
1919
fetch {
2020
cache()

pkg/fusionauth/Client.go

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ func (c *FusionAuthClient) CheckChangePasswordUsingJWTWithContext(ctx context.Co
586586
//
587587
// An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
588588
//
589-
// string loginId The loginId of the User that you intend to change the password for.
589+
// string loginId The loginId (email or username) of the User that you intend to change the password for.
590590
func (c *FusionAuthClient) CheckChangePasswordUsingLoginId(loginId string) (*BaseHTTPResponse, *Errors, error) {
591591
return c.CheckChangePasswordUsingLoginIdWithContext(context.TODO(), loginId)
592592
}
@@ -598,14 +598,52 @@ func (c *FusionAuthClient) CheckChangePasswordUsingLoginId(loginId string) (*Bas
598598
//
599599
// An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
600600
//
601-
// string loginId The loginId of the User that you intend to change the password for.
601+
// string loginId The loginId (email or username) of the User that you intend to change the password for.
602602
func (c *FusionAuthClient) CheckChangePasswordUsingLoginIdWithContext(ctx context.Context, loginId string) (*BaseHTTPResponse, *Errors, error) {
603603
var resp BaseHTTPResponse
604604
var errors Errors
605605

606606
restClient := c.Start(&resp, &errors)
607607
err := restClient.WithUri("/api/user/change-password").
608-
WithParameter("username", loginId).
608+
WithParameter("loginId", loginId).
609+
WithMethod(http.MethodGet).
610+
Do(ctx)
611+
if restClient.ErrorRef == nil {
612+
return &resp, nil, err
613+
}
614+
return &resp, &errors, err
615+
}
616+
617+
// CheckChangePasswordUsingLoginIdAndLoginIdTypes
618+
// Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
619+
// When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
620+
// your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
621+
//
622+
// An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
623+
//
624+
// string loginId The loginId of the User that you intend to change the password for.
625+
// []string loginIdTypes The identity types that FusionAuth will compare the loginId to.
626+
func (c *FusionAuthClient) CheckChangePasswordUsingLoginIdAndLoginIdTypes(loginId string, loginIdTypes []string) (*BaseHTTPResponse, *Errors, error) {
627+
return c.CheckChangePasswordUsingLoginIdAndLoginIdTypesWithContext(context.TODO(), loginId, loginIdTypes)
628+
}
629+
630+
// CheckChangePasswordUsingLoginIdAndLoginIdTypesWithContext
631+
// Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
632+
// When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
633+
// your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
634+
//
635+
// An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
636+
//
637+
// string loginId The loginId of the User that you intend to change the password for.
638+
// []string loginIdTypes The identity types that FusionAuth will compare the loginId to.
639+
func (c *FusionAuthClient) CheckChangePasswordUsingLoginIdAndLoginIdTypesWithContext(ctx context.Context, loginId string, loginIdTypes []string) (*BaseHTTPResponse, *Errors, error) {
640+
var resp BaseHTTPResponse
641+
var errors Errors
642+
643+
restClient := c.Start(&resp, &errors)
644+
err := restClient.WithUri("/api/user/change-password").
645+
WithParameter("loginId", loginId).
646+
WithParameter("loginIdTypes", loginIdTypes).
609647
WithMethod(http.MethodGet).
610648
Do(ctx)
611649
if restClient.ErrorRef == nil {
@@ -7320,7 +7358,7 @@ func (c *FusionAuthClient) RetrieveUserByLoginIdWithContext(ctx context.Context,
73207358
// Retrieves the user for the loginId, using specific loginIdTypes.
73217359
//
73227360
// string loginId The email or username of the user.
7323-
// []string loginIdTypes the identity types that FusionAuth will compare the loginId to.
7361+
// []string loginIdTypes The identity types that FusionAuth will compare the loginId to.
73247362
func (c *FusionAuthClient) RetrieveUserByLoginIdWithLoginIdTypes(loginId string, loginIdTypes []string) (*UserResponse, *Errors, error) {
73257363
return c.RetrieveUserByLoginIdWithLoginIdTypesWithContext(context.TODO(), loginId, loginIdTypes)
73267364
}
@@ -7329,7 +7367,7 @@ func (c *FusionAuthClient) RetrieveUserByLoginIdWithLoginIdTypes(loginId string,
73297367
// Retrieves the user for the loginId, using specific loginIdTypes.
73307368
//
73317369
// string loginId The email or username of the user.
7332-
// []string loginIdTypes the identity types that FusionAuth will compare the loginId to.
7370+
// []string loginIdTypes The identity types that FusionAuth will compare the loginId to.
73337371
func (c *FusionAuthClient) RetrieveUserByLoginIdWithLoginIdTypesWithContext(ctx context.Context, loginId string, loginIdTypes []string) (*UserResponse, *Errors, error) {
73347372
var resp UserResponse
73357373
var errors Errors
@@ -7748,7 +7786,7 @@ func (c *FusionAuthClient) RetrieveUserLoginReportByLoginIdWithContext(ctx conte
77487786
// string loginId The userId id.
77497787
// int64 start The start instant as UTC milliseconds since Epoch.
77507788
// int64 end The end instant as UTC milliseconds since Epoch.
7751-
// []string loginIdTypes the identity types that FusionAuth will compare the loginId to.
7789+
// []string loginIdTypes The identity types that FusionAuth will compare the loginId to.
77527790
func (c *FusionAuthClient) RetrieveUserLoginReportByLoginIdAndLoginIdTypes(applicationId string, loginId string, start int64, end int64, loginIdTypes []string) (*LoginReportResponse, *Errors, error) {
77537791
return c.RetrieveUserLoginReportByLoginIdAndLoginIdTypesWithContext(context.TODO(), applicationId, loginId, start, end, loginIdTypes)
77547792
}
@@ -7761,7 +7799,7 @@ func (c *FusionAuthClient) RetrieveUserLoginReportByLoginIdAndLoginIdTypes(appli
77617799
// string loginId The userId id.
77627800
// int64 start The start instant as UTC milliseconds since Epoch.
77637801
// int64 end The end instant as UTC milliseconds since Epoch.
7764-
// []string loginIdTypes the identity types that FusionAuth will compare the loginId to.
7802+
// []string loginIdTypes The identity types that FusionAuth will compare the loginId to.
77657803
func (c *FusionAuthClient) RetrieveUserLoginReportByLoginIdAndLoginIdTypesWithContext(ctx context.Context, applicationId string, loginId string, start int64, end int64, loginIdTypes []string) (*LoginReportResponse, *Errors, error) {
77667804
var resp LoginReportResponse
77677805
var errors Errors

0 commit comments

Comments
 (0)