Class DefaultCookieSigner

  • All Implemented Interfaces:
    CookieSigner

    @Singleton
    public class DefaultCookieSigner
    extends Object
    implements CookieSigner
    This class delegates to the Scala CookieSigner.
    • Constructor Detail

      • DefaultCookieSigner

        @Inject
        public DefaultCookieSigner​(play.api.libs.crypto.CookieSigner signer)
    • Method Detail

      • sign

        public String sign​(String message)
        Signs the given String using the application's secret key.
        Specified by:
        sign in interface CookieSigner
        Parameters:
        message - The message to sign.
        Returns:
        A hexadecimal encoded signature.
      • sign

        public String sign​(String message,
                           byte[] key)
        Signs the given String using the given key.
        Specified by:
        sign in interface CookieSigner
        Parameters:
        message - The message to sign.
        key - The private key to sign with.
        Returns:
        A hexadecimal encoded signature.
      • asScala

        public play.api.libs.crypto.CookieSigner asScala()
        Specified by:
        asScala in interface CookieSigner
        Returns:
        The Scala version for this cookie signer.