This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.nhn.jwt; | |
| import com.auth0.jwt.JWT; | |
| import com.auth0.jwt.algorithms.Algorithm; | |
| import com.auth0.jwt.interfaces.ECDSAKeyProvider; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.google.common.collect.Maps; | |
| import com.nimbusds.jose.*; | |
| import com.nimbusds.jose.crypto.ECDSASigner; | |
| import com.nimbusds.jose.jwk.Curve; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ModelMappersTest { | |
| private static ModelMapper modelMapper; | |
| @BeforeClass | |
| public static void beforeClass() { | |
| modelMapper = new ModelMapper(); | |
| modelMapper.addConverter(new AbstractConverter<A, B>() { | |
| @Override | |
| protected B convert(A a) { | |
| return B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public Map<String, Object> createOptions() { | |
| final Map<String, Object> options = new HashMap<String, Object>(); | |
| options.put(PushSdk.KEY_ACTIVITY, YOUR_ACTIVITY); // Required. | |
| options.put(PushSdk.KEY_SENDER_ID, YOUR_SENDER_ID); // Required. | |
| options.put(PushSdk.KEY_SERVER_URL, "https://api-push.cloud.toast.com"); // Optional. Default: https://api-push.cloud.toast.com | |
| options.put(PushSdk.KEY_CHANNEL, "default-channel"); // Optional. Default: ""(empty). | |
| options.put(PushSdk.KEY_PUSH_TYPE, YOUR_PUSH_TYPE); // Optional. PushSdk.PUSH_TYPE_GCM or PushSdk.PUSH_TYPE_TENCENT. Default: PushSdk.PUSH_TYPE_GCM. | |
| options.put(PushSdk.KEY_AGREE_NOTIFICATION, true); // Optional. Default: false. | |
| options.put(PushSdk.KEY_AGREE_AD, true); // Optional. Default: false. | |
| options.put(PushSdk.KEY_AGREE_NIGHT_AD, true); // Optional. Default: false. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final Map<String, Object> options = new HashMap<String, Object>(); | |
| options.put(PushSdk.KEY_ACTIVITY, YOUR_ACTIVITY); // Required. | |
| options.put(PushSdk.KEY_SENDER_ID, YOUR_SENDER_ID); // Required. | |
| options.put(PushSdk.KEY_SERVER_URL, "https://api-push.cloud.toast.com"); // Optional. Default: https://api-push.cloud.toast.com | |
| options.put(PushSdk.KEY_CHANNEL, "default-channel"); // Optional. Default: ""(empty). | |
| options.put(PushSdk.KEY_PUSH_TYPE, YOUR_PUSH_TYPE); // Optional. PushSdk.PUSH_TYPE_GCM or PushSdk.PUSH_TYPE_TENCENT. Default: PushSdk.PUSH_TYPE_GCM. | |
| options.put(PushSdk.KEY_AGREE_NOTIFICATION, true); // Optional. Default: false. | |
| options.put(PushSdk.KEY_AGREE_AD, true); // Optional. Default: false. | |
| options.put(PushSdk.KEY_AGREE_NIGHT_AD, true); // Optional. Default: false. | |
| options.put(PushSdk.KEY_COUNTRY, "KR"); // Optional. Default: "US". |