/** * Decrypt and verify a token. Note this is not public, use BlobCrypterSecurityTokenCodec * instead. * * @param crypter crypter to use for decryption * @param container container that minted the token * @param domain oauth_consumer_key to use for signed fetch with default key * @param token the encrypted token (just the portion after the first ":") * @return the decrypted, verified token. * * @throws BlobCrypterException */ static BlobCrypterSecurityToken decrypt(BlobCrypter crypter, String container, String domain, String token, String activeUrl) throws BlobCrypterException { Map<String, String> values = crypter.unwrap(token, MAX_TOKEN_LIFETIME_SECS); BlobCrypterSecurityToken t = new BlobCrypterSecurityToken(crypter, container, domain); setTokenValues(t, values); t.setActiveUrl(activeUrl); return t; }
/** * Decrypt and verify a token. Note this is not public, use BlobCrypterSecurityTokenCodec * instead. * * @param crypter crypter to use for decryption * @param container container that minted the token * @param domain oauth_consumer_key to use for signed fetch with default key * @param token the encrypted token (just the portion after the first ":") * @return the decrypted, verified token. * * @throws BlobCrypterException */ static BlobCrypterSecurityToken decrypt(BlobCrypter crypter, String container, String domain, String token, String activeUrl) throws BlobCrypterException { Map<String, String> values = crypter.unwrap(token, MAX_TOKEN_LIFETIME_SECS); BlobCrypterSecurityToken t = new BlobCrypterSecurityToken(crypter, container, domain); setTokenValues(t, values); t.setActiveUrl(activeUrl); return t; }