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

net.accelbyte.sdk.api.iam.operations.clients.AdminCreateClientV3 Maven / Gradle / Ivy

There is a newer version: 0.69.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.clients;

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

/**
 * AdminCreateClientV3
 *
 * 

Add a new OAuth 2.0 client. Protected by the permission: ADMIN:NAMESPACE:{namespace}:CLIENT * [CREATE] * *

A new client automatically granted with these scopes: commerce, account, analytics, * publishing, social. * *

In multi tenant mode, new confidential client will have default client role assigned to it. * The role will have all permissions to access all APIs that's supported by game server SDK and DS * uploader. * *

action code: 10301 * *

Fields Description: * *

* clientId : The client ID. e.g f815e5c44f364993961be3b3f26a7bf4 * *

* clientName : The client name. e.g E-commerce * *

* secret : The client's secret. It's empty if the client's type is a public client. Otherwise, * the client secret is required * *

* namespace : The namespace where the client lives. e.g sample-game * *

* redirectUri : Contains the redirect URI used in OAuth callback. e.g * https://example.net/platform * *

* oauthClientType : The OAuth 2.0 client type. The client type determines whether the * authorization needs Proof Of Key Exchange or not. A public client type doesn't have a client * secret and should use PKCE flow. A confidential client type has a client secret and don't use * PKCE flow Supported oAuthClientType : * *

* Public * *

* Confidential * *

* audiences : List of target client IDs who is intended to receive the token. e.g * ["eaaa65618fe24293b00a61454182b435", "40073ee9bc3446d3a051a71b48509a5d"] * *

* baseUri : A base URI of the application. It is used for making sure the token is intended to * be used by the client. e.g https://example.net/platform * *

* clientPermissions : Contains the client's permissions * *

* deletable : The flag to identify whether client is deletable (optional). default value: true * *

* clientPlatform : available client platform (optional). default value: "" * *

* Playstation * *

* Xbox * *

* Steam * *

* Epic * *

* IOS * *

* GooglePlay * *

* Nintendo * *

* Oculus * *

* twoFactorEnabled : The flag to indicate whether 2FA validation is enable for this client. * default value: false * *

* oauthAccessTokenExpiration : a configurable expiration time for access_token , default * value: 0 (mean fetch value from environment variable) * *

* oauthRefreshTokenExpiration : a configurable expiration time for refresh_token , default * value: 0 (mean fetch value from environment variable) * *

* oauthAccessTokenExpirationTimeUnit : a configurable expiration time unit for access_token , * default value: SECONDS * *

* oauthRefreshTokenExpirationTimeUnit : a configurable expiration time unit for refresh_token * , default value: SECONDS */ @Getter @Setter public class AdminCreateClientV3 extends Operation { /** generated field's value */ private String path = "/iam/v3/admin/namespaces/{namespace}/clients"; private String method = "POST"; private List consumes = Arrays.asList("application/json"); private List produces = Arrays.asList("application/json"); private String locationQuery = null; /** fields as input parameter */ private String namespace; private ClientmodelClientCreationV3Request body; /** * @param namespace required * @param body required */ @Builder // @deprecated 2022-08-29 - All args constructor may cause problems. Use builder instead. @Deprecated public AdminCreateClientV3(String namespace, ClientmodelClientCreationV3Request body) { this.namespace = namespace; this.body = body; securities.add("Bearer"); } @Override public Map getPathParams() { Map pathParams = new HashMap<>(); if (this.namespace != null) { pathParams.put("namespace", this.namespace); } return pathParams; } @Override public ClientmodelClientCreationV3Request getBodyParams() { return this.body; } @Override public boolean isValid() { if (this.namespace == null) { return false; } return true; } public ClientmodelClientV3Response parseResponse( int code, String contentType, InputStream payload) throws HttpResponseException, IOException { if (code != 201) { final String json = Helper.convertInputStreamToString(payload); throw new HttpResponseException(code, json); } final String json = Helper.convertInputStreamToString(payload); return new ClientmodelClientV3Response().createFromJson(json); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy