This file contains 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
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when | |
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you | |
# create that file from scratch, like Debian / Ubuntu do. | |
# | |
# Before applying, run your application with the Java command line parameter | |
# java -Djavax.net.ssl.trustStorePassword=changeit ... | |
# to verify that this workaround is relevant to your particular issue. | |
# | |
# The parameter by itself can be used as a workaround, as well. |
This file contains 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 scala.util._ | |
import java.security.SecureRandom | |
import java.security.MessageDigest | |
/* | |
* Generates a Bearer Token with a length of | |
* 32 characters (MD5) or 64 characters (SHA-256) according to the | |
* specification RFC6750 (http://tools.ietf.org/html/rfc6750) | |
* | |
* Uniqueness obtained by hashing system time combined with a |