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.yandex | |
import com.auth0.jwt.JWT | |
import com.auth0.jwt.algorithms.Algorithm | |
import java.security.interfaces.RSAPrivateKey | |
import java.util.* | |
fun generateJwtToken( | |
kid: String, // идентификатор ключа | |
iss: String, // идентификатор сервисного аккаунта | |
privateKey: String // ваш приватный ключ в формате PEM |
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
import com.fasterxml.jackson.databind.ObjectMapper; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import org.bouncycastle.util.io.pem.PemObject; | |
import org.bouncycastle.util.io.pem.PemReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.Reader; | |
import java.nio.file.Files; | |
import java.nio.file.Path; |
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
260 | |
230 | |
344 | |
189 | |
186 | |
376 | |
187 | |
497 | |
101 | |
488 |
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
1c1a3de4-c711-4e9c-bed2-e75fd69ce920 | |
ad9e03f0-4bd4-46db-k79e-94ca17d4b74f | |
f087d9fc-xyz3-4a3f-93e0-bdb8d9b68268 | |
92ae7a-94f-40c-a22-de4b42dd13 | |
f66024c3_50f8_442e_9387_28746581f472 |