Documentation and started tests for auth package.

This commit is contained in:
mikestefanello 2021-12-17 19:58:44 -05:00
parent ed9413ee17
commit 774f0b0858
5 changed files with 175 additions and 25 deletions

17
auth/errors.go Normal file
View file

@ -0,0 +1,17 @@
package auth
// NotAuthenticatedError is an error returned when a user is not authenticated
type NotAuthenticatedError struct{}
// Error implements the error interface.
func (e NotAuthenticatedError) Error() string {
return "user not authenticated"
}
// InvalidTokenError is an error returned when an invalid token is provided
type InvalidTokenError struct{}
// Error implements the error interface.
func (e InvalidTokenError) Error() string {
return "invalid token"
}