All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.accelbyte.sdk.api.iam.operations.users.PlatformLink Maven / Gradle / Ivy

There is a newer version: 0.67.0
Show newest version
/*
 * Copyright (c) 2022 AccelByte Inc. All Rights Reserved
 * This is licensed software from AccelByte Inc, for limitations
 * and restrictions contact your company contract manager.
 *
 * Code generated. DO NOT EDIT.
 */

package net.accelbyte.sdk.api.iam.operations.users;

import java.io.*;
import java.util.*;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import net.accelbyte.sdk.core.HttpResponseException;
import net.accelbyte.sdk.core.Operation;
import net.accelbyte.sdk.core.util.Helper;

/**
 * PlatformLink
 *
 * 

## The endpoint is going to be deprecated * *

Endpoint migration guide * *

* Substitute endpoint: /iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId} * [POST] * *

Required permission 'NAMESPACE:{namespace}:USER:{userId} [UPDATE]'. * *

Prerequisite: Platform client configuration need to be added to database for specific * platformId. Namespace service URL need to be specified (refer to required environment variables). * *

## Supported platforms: * *

* steam : The ticket’s value is the authentication code returned by Steam. * *

* steamopenid : Steam's user authentication method using OpenID 2.0. The ticket's value is URL * generated by Steam on web authentication * *

* facebook : The ticket’s value is the authorization code returned by Facebook OAuth * *

* google : The ticket’s value is the authorization code returned by Google OAuth * *

* oculus : The ticket’s value is a string composed of Oculus's user ID and the nonce * separated by a colon (:). * *

* twitch : The ticket’s value is the authorization code returned by Twitch OAuth. * *

* android : The ticket's value is the Android’s device ID * *

* ios : The ticket's value is the iOS’s device ID. * *

* apple : The ticket’s value is the authorization code returned by Apple OAuth. * *

* device : Every device that does’nt run Android and iOS is categorized as a device * platform. The ticket's value is the device’s ID. * *

* discord : The ticket’s value is the authorization code returned by Discord OAuth. * * @deprecated */ @Deprecated @Getter @Setter public class PlatformLink extends Operation { /** generated field's value */ private String path = "/iam/namespaces/{namespace}/users/{userId}/platforms/{platformId}/link"; private String method = "POST"; private List consumes = Arrays.asList("application/x-www-form-urlencoded"); private List produces = Arrays.asList("application/json"); private String locationQuery = null; /** fields as input parameter */ private String namespace; private String platformId; private String userId; private String ticket; /** * @param namespace required * @param platformId required * @param userId required * @param ticket required */ @Builder // @deprecated 2022-08-29 - All args constructor may cause problems. Use builder instead. @Deprecated public PlatformLink(String namespace, String platformId, String userId, String ticket) { this.namespace = namespace; this.platformId = platformId; this.userId = userId; this.ticket = ticket; securities.add("Bearer"); } @Override public Map getPathParams() { Map pathParams = new HashMap<>(); if (this.namespace != null) { pathParams.put("namespace", this.namespace); } if (this.platformId != null) { pathParams.put("platformId", this.platformId); } if (this.userId != null) { pathParams.put("userId", this.userId); } return pathParams; } @Override public Map getFormParams() { Map formDataParams = new HashMap<>(); if (this.ticket != null) { formDataParams.put("ticket", this.ticket); } return formDataParams; } @Override public boolean isValid() { if (this.namespace == null) { return false; } if (this.platformId == null) { return false; } if (this.userId == null) { return false; } if (this.ticket == null) { return false; } return true; } public void handleEmptyResponse(int code, String contentType, InputStream payload) throws HttpResponseException, IOException { if (code != 204) { final String json = Helper.convertInputStreamToString(payload); throw new HttpResponseException(code, json); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy