(self, outgoing, incoming)
| 582 | self.creds = creds |
| 583 | |
| 584 | def authenticate(self, outgoing, incoming): |
| 585 | username = incoming.read() |
| 586 | password = incoming.read() |
| 587 | if username in self.creds and self.creds[username] == password: |
| 588 | outgoing.write(base64.b64encode(b'secret:' + username)) |
| 589 | else: |
| 590 | raise flight.FlightUnauthenticatedError( |
| 591 | "invalid username/password") |
| 592 | |
| 593 | def is_valid(self, token): |
| 594 | token = base64.b64decode(token) |