Skip to content

Commit 3aaaa71

Browse files
committed
Added another support for existing users
1 parent 9bb0451 commit 3aaaa71

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/main/java/com/auth0/client/mgmt/SelfServiceProfilesEntity.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.auth0.client.mgmt;
22

3+
import com.auth0.client.auth.AuthAPI;
34
import com.auth0.client.mgmt.filter.PageBasedPaginationFilter;
45
import com.auth0.json.mgmt.selfserviceprofiles.*;
56
import com.auth0.net.*;
@@ -209,6 +210,34 @@ public Request<SsoAccessTicketResponse> createSsoAccessTicket(String id, SsoAcce
209210
return request;
210211
}
211212

213+
214+
/**
215+
* Create a new SSO access ticket.
216+
* A token with {@code create:sso_access_tickets} scope is needed
217+
* @see <a href="https://auth0.com/docs/api/management/v2#!/self-service-profiles/post-sso-ticket">https://auth0.com/docs/api/management/v2#!/self-service-profiles/post-sso-ticket</a>
218+
* @param id the self-service profile ID.
219+
* @param payload the payload.
220+
* @return a Request to execute.
221+
*
222+
* @deprecated Use {@link #createSsoAccessTicket(String, SsoAccessTicketRequest)} to create sso access ticket.
223+
*/
224+
@Deprecated
225+
public Request<SsoAccessTicketResponse> createSsoAccessTicket(String id, Object payload) {
226+
Asserts.assertNotNull(id, "id");
227+
Asserts.assertNotNull(payload, "payload");
228+
229+
HttpUrl.Builder builder = baseUrl.newBuilder()
230+
.addPathSegments(ORGS_PATH)
231+
.addPathSegment(id)
232+
.addPathSegment("sso-ticket");
233+
String url = builder.build().toString();
234+
235+
BaseRequest<SsoAccessTicketResponse> request = new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.POST, new TypeReference<SsoAccessTicketResponse>() {
236+
});
237+
request.setBody(payload);
238+
return request;
239+
}
240+
212241
/**
213242
* Revoke an SSO ticket.
214243
* A token with {@code delete:sso_access_tickets} scope is needed

0 commit comments

Comments
 (0)