Added initial authorization layer.
This commit is contained in:
@@ -60,6 +60,8 @@ where
|
||||
fn decode(token: TokenRow) -> Result<Token, RepositoryError> {
|
||||
Ok(Token {
|
||||
id: token.id,
|
||||
user_id: token.user_id,
|
||||
user_app_id: token.user_app_id,
|
||||
access_token_hash: token.access_token_hash,
|
||||
refresh_token_hash: token.refresh_token_hash,
|
||||
access_expires_at: token.access_expires_at,
|
||||
@@ -73,6 +75,8 @@ fn decode(token: TokenRow) -> Result<Token, RepositoryError> {
|
||||
fn encode(token: Token) -> TokenRow {
|
||||
TokenRow {
|
||||
id: token.id,
|
||||
user_id: token.user_id,
|
||||
user_app_id: token.user_app_id,
|
||||
access_token_hash: token.access_token_hash,
|
||||
refresh_token_hash: token.refresh_token_hash,
|
||||
access_expires_at: token.access_expires_at,
|
||||
|
||||
Reference in New Issue
Block a user