code: func IsRegistered(user, pass string) (*models.Principal, error) {
  	if password, ok := userDb[user]; ok {
  		if pass == password {
  			return &models.Principal{
  				Name: user,
  			}, nil
  		}
  	}
  	return nil, errors.New(401, "Unauthorized: not a registered user")
  }
docs: // Customized authorizer methods for our sample API
  // IsRegistered determines if the user is properly registered,
  // i.e if a valid username:password pair has been provided