code: func (service *Service) FilterAuthorizedScopes(r *http.Request, username string, grantedTo string, requestedscopes []string) (authorizedScopes []string, err error) {
  	authorization, err := userdb.NewManager(r).GetAuthorization(username, grantedTo)
  	if authorization == nil || err != nil {
  		return
  	}
  
  	authorizedScopes = authorization.FilterAuthorizedScopes(requestedscopes)
  
  	return
  }
docs: //FilterAuthorizedScopes filters the requested scopes to the ones that are authorizated, if no authorization exists, authorizedScops is nil