Change Base64 encoding to be url_safe, add crude implementation of a Controller

This commit is contained in:
Maciej Szlosarczyk 2018-07-20 16:46:22 +03:00
parent dc8230dcc2
commit 35c3f0a5bf
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
6 changed files with 50 additions and 7 deletions

View file

@ -28,7 +28,7 @@ class AuthTokenCreator
encryptor.encrypt
encryptor.key = key
encrypted_bytes = encryptor.update(hashable) + encryptor.final
Base64.encode64(encrypted_bytes)
Base64.urlsafe_encode64(encrypted_bytes)
end
def token_in_hash