An AuthMode is the interface implemented by diffent authentication schemes.
| 63 | // An AuthMode is the interface implemented by diffent authentication |
| 64 | // schemes. |
| 65 | type AuthMode interface { |
| 66 | // AllowedAccess returns a bitmask of all operations |
| 67 | // this user/request is allowed to do. |
| 68 | AllowedAccess(req *http.Request) Operation |
| 69 | // AddAuthHeader inserts in req the credentials needed |
| 70 | // for a client to authenticate. |
| 71 | AddAuthHeader(req *http.Request) |
| 72 | } |
| 73 | |
| 74 | // UnauthorizedSender may be implemented by AuthModes which want to |
| 75 | // handle sending unauthorized. |
no outgoing calls
no test coverage detected