hezean / sustc

Template for project 2 of SUSTech Principles of Database Systems (CS307 / CS213), 23 fall semester.
http://172.18.34.154
MIT License
22 stars 10 forks source link

[UserService] Confusion about AuthInfo #26

Closed Cypher-Bruce closed 11 months ago

Cypher-Bruce commented 11 months ago

Describe your question

I have confusion about the validation of AuthInfo.

     *   <li>the {@code auth} is invalid
     *     <ul>
     *       <li>both {@code qq} and {@code wechat} are non-empty while they do not correspond to same user</li>
     *       <li>{@code mid} is invalid while {@code qq} and {@code wechat} are both invalid (empty or not found)</li>
     *     </ul>
     *   </li>

In my understanding, there are four ways of validation:

My questions are:

sses7757 commented 11 months ago

@Cypher-Bruce

  1. We may or may not provide in different test cases.
  2. No.
Cypher-Bruce commented 11 months ago

@sses7757 Just to comfirm: When multiple unique attributes are provided(mid, qq or wechat), AuthInfo will be regarded as valid only if all attributes are valid(can found a user) and correspond to the same user.

sses7757 commented 11 months ago

@Cypher-Bruce Yes.

Cypher-Bruce commented 11 months ago

Thank you for your reply.