Auth
- Description:
사용자 인증과 관련된 함수들이 포함되어 있습니다.
Methods
(static) authorize(settings)
- Description:
사용자가 앱에 로그인할 수 있도록 인가 코드를 요청하는 함수입니다. 인가 코드를 받을 수 있는 서버 개발이 필요합니다.
- See:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object | 인가 코드 요청과 관련된 설정을 key/value로 전달합니다. Properties
|
(static) cleanup()
- Description:
로그인 버튼을 생성하기 위해 삽입한 iframe을 삭제하고 리소스를 해제합니다.
(static) getAccessToken() → {String}
Returns:
사용 중인 액세스 토큰
- Type
- String
(static) getAppKey() → {String}
Returns:
사용 중인 앱 키
- Type
- String
(static) getStatusInfo() → {Promise.<(StatusResponse|AuthError)>}
- Description:
현재 로그인 상태를 반환합니다.
Returns:
- Type
- Promise.<(StatusResponse|AuthError)>
(static) logout() → {Promise.<(LogoutResponse|AuthError)>}
- Description:
현재 로그인되어 있는 사용자를 로그아웃시키고, 액세스 토큰을 삭제합니다.
- See:
Returns:
- Type
- Promise.<(LogoutResponse|AuthError)>
(static) selectShippingAddress(settings) → {Promise.<(ShippingAddressResponse|ShippingAddressError)>}
- Description:
배송지를 선택하여 배송지 ID를 얻을 때 사용합니다.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object | 배송지 선택하기와 관련된 설정을 key/value로 전달합니다. Properties
|
Returns:
- Type
- Promise.<(ShippingAddressResponse|ShippingAddressError)>
(static) setAccessToken(token, persistopt)
- Description:
API 호출 시 사용할 액세스 토큰을 설정합니다.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
token |
String | 사용할 액세스 토큰 |
||
persist |
Boolean |
<optional> |
true
|
새로고침을 하더라도 액세스 토큰을 사용할 수 있도록 |
Type Definitions
AuthError
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
error |
Object |
Properties
|
LogoutResponse
Properties:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
userInfo |
Object |
Properties
|
ShippingAddressError
Properties:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error |
Object |
Properties
|
ShippingAddressResponse
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
response |
Object |
Properties
|
StatusResponse
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
statusInfo |
Object |
Properties
|