Create AuthTokenCreator and AuthTokenDecryptor classes

This commit is contained in:
Maciej Szlosarczyk 2018-07-20 15:21:10 +03:00
parent dad57ba528
commit dc8230dcc2
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
8 changed files with 221 additions and 33 deletions

View file

@ -4,7 +4,7 @@ class RegistrantApiAuthenticationTest < ApplicationSystemTestCase
def setup
super
@user_hash = {ident: "37010100049", first_name: 'Adam', last_name: 'Baker'}
@user_hash = {ident: '37010100049', first_name: 'Adam', last_name: 'Baker'}
@existing_user = RegistrantUser.find_or_create_by_api_data(@user_hash)
end
@ -15,9 +15,9 @@ class RegistrantApiAuthenticationTest < ApplicationSystemTestCase
def test_request_creates_user_when_one_does_not_exist
params = {
ident: "30110100103",
first_name: "John",
last_name: "Smith",
ident: '30110100103',
first_name: 'John',
last_name: 'Smith',
}
post '/api/v1/registrant/auth/eid', params