mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #11559 from overleaf/jpa-access-token-encryptor-remove-v1
[access-token-encryptor] drop support for legacy v1 token scheme GitOrigin-RevId: 2d32453ad38119fa45cfd77463091f2c91dfe647
This commit is contained in:
@@ -72,18 +72,20 @@ describe('AccessTokenEncryptor', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('should decrypt an 2015 string to get the same object', function (done) {
|
||||
it('should not be able to decrypt 2015 string', function (done) {
|
||||
this.encryptor.decryptToJson(this.encrypted2015, (err, decrypted) => {
|
||||
expect(err).to.be.null
|
||||
expect(decrypted).to.deep.equal(this.testObject)
|
||||
expect(err).to.exist
|
||||
expect(err.message).to.equal('token scheme v1 is not supported anymore')
|
||||
expect(decrypted).to.not.exist
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should decrypt an 2016 string to get the same object', function (done) {
|
||||
it('should not be able to decrypt a 2016 string', function (done) {
|
||||
this.encryptor.decryptToJson(this.encrypted2016, (err, decrypted) => {
|
||||
expect(err).to.be.null
|
||||
expect(decrypted).to.deep.equal(this.testObject)
|
||||
expect(err).to.exist
|
||||
expect(err.message).to.equal('token scheme v1 is not supported anymore')
|
||||
expect(decrypted).to.not.exist
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user