# 클래스 Authentication 보조 시스템

> Reference the Authentication Subsystem class for handling connections to Unity Authentication.

Unity Authentication 시스템에 대한 연결을 처리하기 위한 보조 시스템입니다.

##### Include##include

```cpp
#include "AuthenticationSubsystem.h"
```

##### 구문##syntax

```cpp
UCLASS()
class AUTHENTICATION_API UAuthenticationSubsystem : public UGameInstanceSubsystem
```

## 생성자##constructors

### UAuthenticationSubsystem()##uauthenticationsubsystem()

Authentication 보조 시스템의 기본 생성자입니다.

#### 선언##declaration

```cpp
UAuthenticationSubsystem()
```

### UAuthenticationSubsystem(FVTableHelper&)##uauthenticationsubsystem(fvtablehelper&)

전달 선언에 대한 생성자를 오버라이드합니다.

#### 선언##declaration

```cpp
UAuthenticationSubsystem(FVTableHelper& Helper)
```

#### 파라미터##parameters

| **이름** | **설명**                                      |
| :----- | :------------------------------------------ |
| Helper | Helper 클래스를 사용하여 특수한 핫 리로드 생성자를 호출할 수 있습니다. |

## 소멸자##destructors

### UAuthenticationSubsystem()##uauthenticationsubsystem()

Authentication 보조 시스템의 기본 소멸자입니다.

#### 선언##declaration

```cpp
virtual ~UAuthenticationSubsystem()
```

## 오버라이드##overrides

### Initialize(FSubsystemCollectionBase&)##initialize(fsubsystemcollectionbase&)

USubsystem에서 오버라이드를 초기화합니다.

#### 선언##declaration

```cpp
virtual void Initialize(FSubsystemCollectionBase& Collection) override
```

### Deinitialize()##deinitialize()

USubsystem에서 오버라이드를 초기화합니다.

#### 선언##declaration

```cpp
virtual void Deinitialize() override
```

### ShouldCreateSubsystem(UObject\*)##shouldcreatesubsystem(uobject\*)

USubsystem에서 오버라이드를 초기화합니다.

#### 선언##declaration

```cpp
virtual bool ShouldCreateSubsystem(UObject* Outer) const override
```

## 메서드##methods

### SignInAnonymously(FAuthenticationSignInOptions, Unity::Services::Core::THandler\<FAuthenticationResponse>)##signinanonymously(fauthenticationsigninoptions,-unity::services::core::thandlerfauthenticationresponse)

현재 사용자를 익명으로 로그인합니다. 자격 증명이 필요하지 않으며 세션은 현재 기기로만 제한됩니다.

#### 선언##declaration

```cpp
void SignInAnonymously(FAuthenticationSignInOptions Options, Unity::Services::Core::THandler<FAuthenticationResponse> ResponseHandler)
```

#### 파라미터##parameters

| **이름**            | **유형**                                                                                                                                                        | **설명**                      |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------- |
| `Options`         | [FAuthenticationSignInOptions](./models/authentication-sign-in-options.md)                                                                                    | 로그인 옵션입니다.                  |
| `ResponseHandler` | [THandler](/authentication-unreal/sdk-api/services-core/utils/services-utils.md#thandler)`<`[FAuthenticationResponse](./models/authentication-response.md)`>` | API가 응답을 반환할 때 실행되는 핸들러입니다. |

### GetUserInfo(Unity::Services::Core::THandler\<FAuthenticationUserResponse>)##getuserinfo(unity::services::core::thandlerfauthenticationuserresponse)

계정 생성 시간 및 연동된 외부 ID와 같은 현재 플레이어의 플레이어 정보를 반환합니다.

#### 선언##declaration

```cpp
void GetUserInfo(Unity::Services::Core::THandler<FAuthenticationUserResponse> ResponseHandler)
```

#### 파라미터##parameters

| **이름**            | **유형**                                                                                                                                                                 | **설명**                      |
| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------- |
| `ResponseHandler` | [THandler](/authentication-unreal/sdk-api/services-core/utils/services-utils.md#thandler)`<`[FAuthenticationUserResponse](./models/authentication-user-response.md)`>` | API가 응답을 반환할 때 실행되는 핸들러입니다. |

### DeleteUser(Unity::Services::Core::THandler\<bool>)##deleteuser(unity::services::core::thandlerbool)

현재 로그인한 사용자를 영구적으로 삭제합니다.

#### 선언##declaration

```cpp
void DeleteUser(Unity::Services::Core::THandler<bool> ResponseHandler)
```

#### 파라미터##parameters

| **이름**            | **유형**                                                                                            | **설명**                      |
| :---------------- | :------------------------------------------------------------------------------------------------ | :-------------------------- |
| `ResponseHandler` | [THandler](/authentication-unreal/sdk-api/services-core/utils/services-utils.md#thandler)`<bool>` | API가 응답을 반환할 때 실행되는 핸들러입니다. |

### RegisterStateChangedCallback(Unity::Services::Core::THandler\<FAuthenticationStateChangedResponse>)##registerstatechangedcallback(unity::services::core::thandlerfauthenticationstatechangedresponse)

인증 상태 변경 시 실행되는 델리게이트에 연결합니다.

#### 선언##declaration

```cpp
void RegisterStateChangedCallback(Unity::Services::Core::THandler<FAuthenticationStateChangedResponse> ResponseHandler)
```

#### 파라미터##parameters

| **이름**            | **유형**                                                                                                                                                                                  | **설명**                  |
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------- |
| `ResponseHandler` | [THandler](/authentication-unreal/sdk-api/services-core/utils/services-utils.md#thandler)`<`[FAuthenticationStateChangedResponse](./models/authentication-state-changed-response.md)`>` | 인증 상태 변경 시 실행되는 핸들러입니다. |

### SignOut(bool)##signout(bool)

제공된 프로필 이름의 현재 사용자를 로그아웃합니다.

#### 선언##declaration

```cpp
bool SignOut(bool bClearCredentials = false)
```

#### 파라미터##parameters

| **이름**              | **유형** | **설명**                               |
| :------------------ | :----- | :----------------------------------- |
| `bClearCredentials` | `bool` | 동일한 계정으로 로그인할 수 있는 세션 토큰을 지우는 옵션입니다. |

### SwitchProfile(const FString&)##switchprofile(const-fstring&)

현재 프로필을 새 프로필 이름으로 전환합니다. 해당 이름으로 프로필을 찾을 수 없는 경우 새 프로필이 생성됩니다.

#### 선언##declaration

```cpp
void SwitchProfile(const FString& ProfileName) const
```

#### 파라미터##parameters

| **파라미터 이름**   | **파라미터 유형**                                                                             | **설명**                          |
| :------------ | :-------------------------------------------------------------------------------------- | :------------------------------ |
| `ProfileName` | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 전환할 프로필의 이름입니다. 아직 없는 경우 추가합니다. |

### ProfileExists(const FString&)##profileexists(const-fstring&)

프로필이 존재하는지 확인합니다.

#### 선언##declaration

```cpp
const bool ProfileExists(const FString& ProfileName) const
```

#### 파라미터##parameters

| **이름**        | **유형**                                                                                  | **설명**           |
| :------------ | :-------------------------------------------------------------------------------------- | :--------------- |
| `ProfileName` | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 확인하려는 프로필 이름입니다. |

#### 다음을 반환##returns

| **유형** | **설명**                             |
| :----- | :--------------------------------- |
| `bool` | 프로필이 존재하면 true, 존재하지 않으면 false입니다. |

### GetCurrentProfileName()##getcurrentprofilename()

현재 프로필의 이름을 반환합니다.

#### 선언##declaration

```cpp
const FString GetCurrentProfileName() const
```

#### 다음을 반환##returns

| **유형**                                                                                  | **설명**         |
| :-------------------------------------------------------------------------------------- | :------------- |
| [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 현재 프로필의 이름입니다. |

### GetProfileNames()##getprofilenames()

모든 활성 플레이어 프로필 이름을 반환합니다.

#### 선언##declaration

```cpp
const TArray<FString> GetProfileNames() const
```

#### 다음을 반환##returns

| **유형**                                                                                                                                                                                | **설명**                |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------- |
| [TArray](https://docs.unrealengine.com/5.3/en-US/array-containers-in-unreal-engine/#tarray)\<[FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/)> | 모든 활성 플레이어 프로필 이름입니다. |

### RegisterProfileChangedCallback(Unity::Services::Core::THandler\<FAuthenticationPlayerProfileChangedResponse>)##registerprofilechangedcallback(unity::services::core::thandlerfauthenticationplayerprofilechangedresponse)

플레이어 프로필 변경 시 실행되는 핸들러에 연결합니다.

#### 선언##declaration

```cpp
void RegisterProfileChangedCallback(Unity::Services::Core::THandler<FAuthenticationPlayerProfileChangedResponse> ResponseHandler)
```

#### 파라미터##parameters

| **이름**            | **유형**                                                                                                                                                                                                   | **설명**                     |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------- |
| `ResponseHandler` | [THandler](/authentication-unreal/sdk-api/services-core/utils/services-utils.md#thandler)`<`[FAuthenticationPlayerProfileChangedResponse](./models/authentication-player-profile-changed-response.md)`>` | 플레이어 프로필 변경 시 실행되는 핸들러입니다. |

### RegisterProfileDeletedCallback(Unity::Services::Core::THandler\<FAuthenticationPlayerProfileDeletedResponse> ResponseHandler)##registerprofiledeletedcallback(unity::services::core::thandlerfauthenticationplayerprofiledeletedresponse-responsehandler)

플레이어 프로필 삭제 시 실행되는 핸들러에 연결합니다.

#### 선언##declaration

```cpp
void RegisterProfileDeletedCallback(Unity::Services::Core::THandler<FAuthenticationPlayerProfileDeletedResponse> ResponseHandler)
```

#### 파라미터##parameters

| **이름**            | **유형**                                                                                                                                                                                                   | **설명**                     |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------- |
| `ResponseHandler` | [THandler](/authentication-unreal/sdk-api/services-core/utils/services-utils.md#thandler)`<`[FAuthenticationPlayerProfileDeletedResponse](./models/authentication-player-profile-deleted-response.md)`>` | 플레이어 프로필 삭제 시 실행되는 핸들러입니다. |

### IsSignedIn()##issignedin()

사용자가 로그인했는지 여부를 확인합니다.

> **Note:**
>
> 사용자는 로그인한 상태를 유지할 수 있지만 세션이 만료된 상태입니다.

#### 선언##declaration

```cpp
bool IsSignedIn() const
```

#### 다음을 반환##returns

| **유형** | **설명**                               |
| :----- | :----------------------------------- |
| `bool` | 사용자가 로그인한 경우 true, 그렇지 않으면 false입니다. |

### IsAnonymous()##isanonymous()

사용자가 익명으로 로그인했는지 확인합니다.

#### 선언##declaration

```cpp
bool IsAnonymous() const
```

#### 다음을 반환##returns

| **유형** | **설명**                                    |
| :----- | :---------------------------------------- |
| `bool` | 사용자가 익명으로 로그인한 경우 true, 그렇지 않으면 false입니다. |

### IsAuthorized()##isauthorized()

사용자가 여전히 권한이 부여된 상태인지 확인합니다.

> **Note:**
>
> 사용자는 액세스 토큰이 유효하게 유지되는 한 권한이 부여된 상태입니다.

#### 선언##declaration

```cpp
bool IsAuthorized() const
```

#### 다음을 반환##returns

| **유형** | **설명**                                 |
| :----- | :------------------------------------- |
| `bool` | 사용자에게 권한을 부여하면 true, 그렇지 않으면 false입니다. |

### IsExpired()##isexpired()

사용자 세션이 만료되었는지 확인합니다.

#### 선언##declaration

```cpp
bool IsExpired() const
```

#### 다음을 반환##returns

| **유형** | **설명**                                  |
| :----- | :-------------------------------------- |
| `bool` | 사용자의 세션이 만료된 경우 true, 그렇지 않으면 false입니다. |

### SessionTokenExists()##sessiontokenexists()

현재 프로필에 대해 저장된 기존 세션 토큰이 있는지 확인합니다.

#### 선언##declaration

```cpp
bool SessionTokenExists() const
```

#### 다음을 반환##returns

| **유형** | **설명**                                  |
| :----- | :-------------------------------------- |
| `bool` | 현재 프로필에 대해 저장된 기존 세션 토큰이 있는 경우 true입니다. |

### GetUnityProjectId()##getunityprojectid()

Unity 프로젝트 ID를 반환합니다.

#### 선언##declaration

```cpp
const FGuid GetUnityProjectId() const
```

#### 다음을 반환##returns

| **유형**                                                                        | **설명**            |
| :---------------------------------------------------------------------------- | :---------------- |
| [FGuid](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Misc/FGuid/) | Unity 프로젝트 ID입니다. |

### GetUnityEnvironmentName()##getunityenvironmentname()

Unity 환경 이름을 반환합니다.

#### 선언##declaration

```cpp
const FString GetUnityEnvironmentName() const
```

#### 다음을 반환##returns

| **유형**                                                                                  | **설명**          |
| :-------------------------------------------------------------------------------------- | :-------------- |
| [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | Unity 환경 이름입니다. |

### GetAccessToken()##getaccesstoken()

현재 사용자의 액세스 토큰을 반환합니다.

#### 선언##declaration

```cpp
FString GetAccessToken() const
```

#### 다음을 반환##returns

| **유형**                                                                                  | **설명**                                                |
| :-------------------------------------------------------------------------------------- | :---------------------------------------------------- |
| [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 현재 사용자가 로그인한 경우 현재 사용자의 액세스 토큰 문자열, 그렇지 않으면 빈 문자열입니다. |

### GetSessionToken()##getsessiontoken()

현재 사용자의 세션 토큰을 반환합니다.

#### 선언##declaration

```cpp
const const FString GetSessionToken() const
```

#### 다음을 반환##returns

| **유형**                                                                                  | **설명**                                               |
| :-------------------------------------------------------------------------------------- | :--------------------------------------------------- |
| [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 현재 사용자가 로그인한 경우 현재 사용자의 세션 토큰 문자열, 그렇지 않으면 빈 문자열입니다. |

### GetUserId()##getuserid()

로그인한 현재 사용자의 ID입니다.

#### 선언##declaration

```cpp
const FString GetUserId() const
```

#### 다음을 반환##returns

| **유형**                                                                                  | **설명**                                |
| :-------------------------------------------------------------------------------------- | :------------------------------------ |
| [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 로그인한 경우 현재 사용자의 ID, 그렇지 않으면 빈 문자열입니다. |

### GetState()##getstate()

Authentication 보조 시스템의 현재 상태입니다.

#### 선언##declaration

```cpp
const EAuthenticationStates GetState() const
```

#### 다음을 반환##returns

| **유형**                                              | **설명**                           |
| :-------------------------------------------------- | :------------------------------- |
| [EAuthenticationStates](./authentication-states.md) | Authentication 보조 시스템의 현재 상태입니다. |

### SetUnityProjectId(FGuid)##setunityprojectid(fguid)

Unity 프로젝트 ID를 설정합니다.

#### 선언##declaration

```cpp
void SetUnityProjectId(FGuid Value)
```

#### 파라미터##parameters

| **이름** | **유형**                                                                        | **설명**                |
| :----- | :---------------------------------------------------------------------------- | :-------------------- |
| 값      | [FGuid](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Misc/FGuid/) | 새로운 Unity 프로젝트 ID입니다. |

### SetUnityEnvironmentName(FString)##setunityenvironmentname(fstring)

Unity 환경 이름을 설정합니다.

#### 선언##declaration

```cpp
void SetUnityEnvironmentName(FString Value)
```

#### 파라미터##parameters

| **이름** | **유형**                                                                                  | **설명**              |
| :----- | :-------------------------------------------------------------------------------------- | :------------------ |
| 값      | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 새로운 Unity 환경 ID입니다. |
