perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Share access scope constants in server auth

alice 20c8fbfc 45169baf

+5 -5
+5 -5
lib/ATProto/PDS/API/Server.pm
··· 704 704 } 705 705 706 706 sub _canonical_access_scope ($scope = undef) { 707 - return 'access' unless defined $scope && length $scope; 708 - return 'access' if $scope eq 'atproto'; 707 + return TOKEN_AUD_ACCESS unless defined $scope && length $scope; 708 + return TOKEN_AUD_ACCESS if $scope eq 'atproto'; 709 709 return $scope; 710 710 } 711 711 ··· 716 716 sub _scope_allows ($scope, $required_scope) { 717 717 $scope = _canonical_access_scope($scope); 718 718 return 1 if !defined($required_scope) || !length($required_scope); 719 - return $scope eq 'access' 719 + return $scope eq TOKEN_AUD_ACCESS 720 720 if $required_scope eq 'full'; 721 - return $scope eq 'access' || $scope eq 'app_password_privileged' 721 + return $scope eq TOKEN_AUD_ACCESS || $scope eq 'app_password_privileged' 722 722 if $required_scope eq 'privileged'; 723 - return $scope eq 'access' || $scope eq 'app_password' || $scope eq 'app_password_privileged' 723 + return $scope eq TOKEN_AUD_ACCESS || $scope eq 'app_password' || $scope eq 'app_password_privileged' 724 724 if $required_scope eq 'standard'; 725 725 return 0; 726 726 }