|
52 | 52 | ) |
53 | 53 |
|
54 | 54 | // startAuthenticationRequestBody is the body sent to the StartAuthentication endpoint in CyberArk Identity; |
55 | | -// see https://api-docs.cyberark.com/docs/identity-api-reference/authentication-and-authorization/operations/create-a-security-start-authentication |
| 55 | +// see https://api-docs.cyberark.com/identity-docs-api/docs/security-api#/Login/start-authentication |
56 | 56 | type startAuthenticationRequestBody struct { |
57 | 57 | // TenantID is the internal ID of the tenant containing the user attempting to log in. In testing, |
58 | 58 | // it seems that the subdomain works in this field. |
@@ -136,6 +136,7 @@ type startAuthenticationMechanism struct { |
136 | 136 | // advanceAuthenticationRequestBody is a request body for the AdvanceAuthentication call to CyberArk Identity, |
137 | 137 | // which should usually be obtained by making requests to StartAuthentication first. |
138 | 138 | // WARNING: This struct can hold secret data (a user's password) |
| 139 | +// See: https://api-docs.cyberark.com/identity-docs-api/docs/security-api#/Login/advance-authentication |
139 | 140 | type advanceAuthenticationRequestBody struct { |
140 | 141 | // Action is a string identifying how we're intending to log in; for username/password, this is |
141 | 142 | // set to "Answer" to indicate that the password is held in the Answer field |
@@ -243,7 +244,7 @@ func (c *Client) LoginUsernamePassword(ctx context.Context, username string, pas |
243 | 244 | // It returns a partially initialized advanceAuthenticationRequestBody ready to send to the server to complete |
244 | 245 | // the login. As this function doesn't have access to the password, it must be added to the returned request body |
245 | 246 | // by the caller before being used as a request to AdvanceAuthentication. |
246 | | -// See https://api-docs.cyberark.com/docs/identity-api-reference/authentication-and-authorization/operations/create-a-security-start-authentication |
| 247 | +// See https://api-docs.cyberark.com/identity-docs-api/docs/security-api#/Login/start-authentication |
247 | 248 | func (c *Client) doStartAuthentication(ctx context.Context, username string) (advanceAuthenticationRequestBody, error) { |
248 | 249 | response := advanceAuthenticationRequestBody{} |
249 | 250 |
|
@@ -358,6 +359,7 @@ func (c *Client) doStartAuthentication(ctx context.Context, username string) (ad |
358 | 359 |
|
359 | 360 | // doAdvanceAuthentication performs the second step of the login process, sending the password to the server |
360 | 361 | // and receiving a token in response. |
| 362 | +// See: https://api-docs.cyberark.com/identity-docs-api/docs/security-api#/Login/advance-authentication |
361 | 363 | func (c *Client) doAdvanceAuthentication(ctx context.Context, username string, password *[]byte, requestBody advanceAuthenticationRequestBody) error { |
362 | 364 | if password == nil { |
363 | 365 | return fmt.Errorf("password must not be nil; this is a programming error") |
|
0 commit comments