Refactor response models for Application and User
This commit is contained in:
parent
97b8d2ae7d
commit
aabdce5ff4
|
|
@ -76,8 +76,10 @@ internal class Create : Endpoint<Request, Response>
|
|||
clientId,
|
||||
clientSecret,
|
||||
apiKey,
|
||||
hashedApiKey,
|
||||
hashedClientSecret);
|
||||
hashedApiKey.EncodeSecret(),
|
||||
hashedApiKey.EncodeSalt(),
|
||||
hashedClientSecret.EncodeSecret(),
|
||||
hashedClientSecret.EncodeSalt());
|
||||
|
||||
await SendOkAsync(response, cancellationToken);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ internal record Response(
|
|||
string ClientId,
|
||||
string ClientSecret,
|
||||
string ApiKey,
|
||||
HashedSecret HashedApiKey,
|
||||
HashedSecret HashedClientSecret
|
||||
string HashedApiKey,
|
||||
string HashedApiKeySalt,
|
||||
string HashedClientSecret,
|
||||
string HashedClientSecretSalt
|
||||
);
|
||||
|
|
@ -62,7 +62,8 @@ internal class Create : ElsaEndpoint<Request, Response>
|
|||
user.Name,
|
||||
password,
|
||||
user.Roles,
|
||||
hashedPassword);
|
||||
hashedPassword.EncodeSecret(),
|
||||
hashedPassword.EncodeSalt());
|
||||
|
||||
await SendOkAsync(response, cancellationToken);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,5 +14,6 @@ internal record Response(
|
|||
string Name,
|
||||
string Password,
|
||||
ICollection<string> Roles,
|
||||
HashedSecret HashedPassword
|
||||
string HashedPassword,
|
||||
string HashedPasswordSalt
|
||||
);
|
||||
Loading…
Reference in a new issue