| 1 | package Langertha::Raider::Provider::Change; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Internal classification of what changed between an accepted and a newly fetched provider manifest | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | our $VERSION = '0.503'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use Moose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Carp qw( croak ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use Scalar::Util qw( blessed ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use URI; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Langertha::Manifest; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use Langertha::Raider::Approval; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | ▶ | use Langertha::Raider::Provider::Fetch; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | # The name of the view's shape. It is part of what the fingerprint covers, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | # so a later change of the view changes every fingerprint -- a stored one | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | # then no longer matches and consent is asked again, never skipped. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use constant VIEW => 'raider-provider-consent-1'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 103 | ▶ | sub manifest_class { 'Langertha::Manifest' } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
manifest_class: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 406 | ▶ | sub fetch_class { 'Langertha::Raider::Provider::Fetch' } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fetch_class: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 101 | ▶ | sub digest_class { 'Langertha::Raider::Approval' } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
digest_class: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 103 | ▶ | sub consent_view { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
consent_view: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 103 | my ( $self, $manifest, $origin ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 103 | $self->_check_manifest($manifest); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | my %endpoints = map { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 306 | $_->id => { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | origin => $self->_origin_of($_->base_url, "endpoint '".$_->id."' base_url"), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | dialect => $_->dialect, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | auth => $self->_auth_type($manifest, $_), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 102 | } @{ $manifest->endpoints }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 102 | view => VIEW, | |||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | origin => $self->_origin_of($origin, 'origin'), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | issuer => $manifest->issuer, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | provider_id => $manifest->provider_id, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | endpoints => \%endpoints, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 35 | ▶ | sub fingerprint { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fingerprint: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 35 | my ( $self, $manifest, $origin ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 35 | return $self->digest_class->digest_arguments( $self->consent_view($manifest, $origin) ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 35 | ▶ | sub classify { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
classify: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 35 | my ( $self, %arg ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 35 | for my $name (qw( old old_origin new new_origin )) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 140 | ▶ | croak __PACKAGE__.'->classify needs '.$name unless defined $arg{$name}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 34 | my ( $old, $new ) = @arg{qw( old new )}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 34 | my $was = $self->consent_view($old, $arg{old_origin}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 33 | my $is = $self->consent_view($new, $arg{new_origin}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 33 | my @changes; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 41 | ▶ | my $change = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 41 | my ( $kind, $consent, $description, %about ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 41 | push @changes, { kind => $kind, consent => $consent, description => $description, %about }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 33 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 33 | for my $field (qw( origin issuer provider_id )) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | $change->($field, 1, $field.' changed: '.$was->{$field}.' -> '.$is->{$field}) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 99 | ▶ | unless $was->{$field} eq $is->{$field}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 33 | $self->_endpoint_changes($change, $old, $new, $was->{endpoints}, $is->{endpoints}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 33 | $self->_auth_changes($change, $old, $new); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 33 | $self->_model_changes($change, $old, $new); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 33 | my $digest = $self->digest_class; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 33 | ▶ | $change->('extensions', 0, 'extensions changed (inert in manifest v1)') | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | unless $digest->digest_arguments($old->extensions) eq $digest->digest_arguments($new->extensions); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | changes => \@changes, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 33 | ▶ | needs_consent => ( ( grep { $_->{consent} } @changes ) ? 1 : 0 ), | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | old_fingerprint => $digest->digest_arguments($was), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | new_fingerprint => $digest->digest_arguments($is), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 33 | ▶ | sub _endpoint_changes { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_endpoint_changes: called CC=11 SCAR=24.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 33 | my ( $self, $change, $old, $new, $was, $is ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 33 | my %ids = map { $_ => 1 } keys %$was, keys %$is; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 33 | for my $id ( sort keys %ids ) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 100 | my $what = "endpoint '".$id."'"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 100 | my ( $before, $after ) = ( $was->{$id}, $is->{$id} ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 100 | ▶ | unless ($before) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 1 | $change->('endpoint_added', 1, $what.' added: '.$self->_describe_endpoint($after), endpoint => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 1 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 99 | ▶ | unless ($after) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 1 | $change->('endpoint_removed', 1, $what.' removed (was '.$self->_describe_endpoint($before).')', endpoint => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 1 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 98 | my ( $old_endpoint, $new_endpoint ) = ( $old->endpoint($id), $new->endpoint($id) ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 98 | ▶ | if ( $before->{origin} ne $after->{origin} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 3 | $change->('endpoint_origin', 1, $what.': origin '.$before->{origin}.' -> '.$after->{origin}, endpoint => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | elsif ( $old_endpoint->base_url ne $new_endpoint->base_url ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 2 | $change->('endpoint_path', 0, $what.': base_url '.$old_endpoint->base_url.' -> '.$new_endpoint->base_url | |||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | .' (same origin)', endpoint => $id); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | $change->('endpoint_dialect', 1, $what.': dialect '.$before->{dialect}.' -> '.$after->{dialect}, endpoint => $id) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 98 | ▶ | unless $before->{dialect} eq $after->{dialect}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 98 | ▶ | if ( $self->_auth_label($before->{auth}) ne $self->_auth_label($after->{auth}) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | $change->('endpoint_auth', 1, $what.': auth '.$self->_auth_label($before->{auth}) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 5 | .' -> '.$self->_auth_label($after->{auth}), endpoint => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | ▶ | elsif ( ( $old_endpoint->auth_ref // '' ) ne ( $new_endpoint->auth_ref // '' ) ) { | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%4/4
$old_endpoint->auth_ref // ""
$new_endpoint->auth_ref // ""
MC/DC100%1/1
$old_endpoint->auth_ref // ""
$old_endpoint->auth_ref
MC/DC100%1/1
$new_endpoint->auth_ref // ""
$new_endpoint->auth_ref
Truth table100%2/2
A
A= $old_endpoint->auth_ref
Truth table100%2/2
A
A= $new_endpoint->auth_ref
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | $change->('endpoint_auth_ref', 0, $what.": auth_ref '".$old_endpoint->auth_ref."' -> '" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 2 | .$new_endpoint->auth_ref."' (same type ".$after->{auth}.')', endpoint => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 33 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | # Auth entries no endpoint of the new manifest names. One that an endpoint | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | # names reaches the endpoint's view, and its change is that endpoint's. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 33 | ▶ | sub _auth_changes { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_auth_changes: called CC=6 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 33 | my ( $self, $change, $old, $new ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 33 | ▶ | my %named = map { defined $_->auth_ref ? ( $_->auth_ref => 1 ) : () } @{ $new->endpoints }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 33 | my %was = map { $_->id => $_->type } @{ $old->auth }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 33 | my %is = map { $_->id => $_->type } @{ $new->auth }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 33 | my %ids = map { $_ => 1 } keys %was, keys %is; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 33 | for my $id ( sort grep { !$named{$_} } keys %ids ) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 4 | my $what = "auth '".$id."'"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 4 | ▶ | if ( !defined $was{$id} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 1 | $change->('auth_added', 0, $what.' added: type '.$is{$id}.' (no endpoint uses it)', auth => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | elsif ( !defined $is{$id} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 2 | $change->('auth_removed', 0, $what.' removed (was type '.$was{$id}.')', auth => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | elsif ( $was{$id} ne $is{$id} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 1 | $change->('auth_type', 0, $what.': type '.$was{$id}.' -> '.$is{$id}.' (no endpoint uses it)', auth => $id); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 33 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 33 | ▶ | sub _model_changes { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_model_changes: called CC=6 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 33 | my ( $self, $change, $old, $new ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 33 | my %was = map { $_->endpoint_ref."\0".$_->id => $_ } @{ $old->models }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 33 | my %is = map { $_->endpoint_ref."\0".$_->id => $_ } @{ $new->models }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 33 | my %keys = map { $_ => 1 } keys %was, keys %is; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 33 | my $digest = $self->digest_class; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 33 | for my $key ( sort keys %keys ) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 103 | my ( $before, $after ) = ( $was{$key}, $is{$key} ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 103 | ▶ | my $model = $before // $after; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$before // $after
MC/DC0%0/2
$before // $after
$before
$after
Truth table66%2/3
A // B
A= $beforeB= $after
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 103 | my $what = "model '".$model->id."' on endpoint '".$model->endpoint_ref."'"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 103 | my %about = ( model => $model->id, endpoint => $model->endpoint_ref ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 103 | ▶ | if ( !$before ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 4 | $change->('model_added', 0, $what.' added', %about); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | elsif ( !$after ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 5 | $change->('model_removed', 0, $what.' removed', %about); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | elsif ( $digest->digest_arguments($before->to_hash->{capabilities}) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | ne $digest->digest_arguments($after->to_hash->{capabilities}) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 2 | $change->('model_capabilities', 0, $what.': capabilities ' | |||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | .$self->_describe_capabilities($before).' -> '.$self->_describe_capabilities($after), %about); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 33 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 103 | ▶ | sub _check_manifest { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_check_manifest: called CC=5 SCAR=17.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 103 | my ( $self, $manifest ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 103 | ▶ | croak __PACKAGE__.' needs a '.$self->manifest_class.', got '.( defined $manifest ? ( ref $manifest || $manifest ) : 'undef' ) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition50%3/6
builtin::blessed($manifest) and $manifest->isa($self->manifest_class)
ref $manifest or $manifest
MC/DC50%1/2
builtin::blessed($manifest) and $manifest->isa($self->manifest_class)
builtin::blessed($manifest)
$manifest->isa($self->manifest_class)
MC/DC0%0/2
ref $manifest or $manifest
ref $manifest
$manifest
Truth table66%2/3
A and B
A= builtin::blessed($manifest)B= $manifest->isa($self->manifest_class)
Truth table33%1/3
A or B
A= ref $manifestB= $manifest
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | unless blessed $manifest && $manifest->isa($self->manifest_class); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 102 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 408 | ▶ | sub _origin_of { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_origin_of: called CC=6 SCAR=18.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 408 | my ( $self, $url, $what ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 408 | ▶ | my $uri = URI->new( $url // '' ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$url // ""
MC/DC100%1/1
$url // ""
$url
Truth table100%2/2
A
A= $url
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 408 | ▶ | croak __PACKAGE__.': '.$what.' names no origin: '.( $url // 'undef' ) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition71%5/7
$uri->can("host") and length($uri->host // "")
$uri->host // ""
$url // "undef"
MC/DC50%1/2
$uri->can("host") and length($uri->host // "")
$uri->can("host")
$uri->host
MC/DC100%1/1
$url // "undef"
$url
Truth table66%2/3
A and B
A= $uri->can("host")B= $uri->host
Truth table100%2/2
A
A= $url
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | unless $uri->can('host') && length( $uri->host // '' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 406 | return $self->fetch_class->origin($uri); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | # Returns undef as a value, not an empty list: it lands in a hash slot. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 306 | ▶ | sub _auth_type { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_auth_type: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 306 | my ( $self, $manifest, $endpoint ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 306 | ▶ | return undef unless defined $endpoint->auth_ref; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 205 | return $manifest->auth_entry($endpoint->auth_ref)->type; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 208 | ▶ | sub _auth_label { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_auth_label: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 208 | my ( $self, $type ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 208 | ▶ | return defined $type ? 'type '.$type : 'none'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 2 | ▶ | sub _describe_endpoint { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_describe_endpoint: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 2 | my ( $self, $view ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 2 | return 'dialect '.$view->{dialect}.' at '.$view->{origin}.', auth '.$self->_auth_label($view->{auth}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 4 | ▶ | sub _describe_capabilities { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_describe_capabilities: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 4 | my ( $self, $model ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 4 | my $caps = $model->capabilities; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 4 | ▶ | return '(none)' unless %$caps; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | 3 | ▶ | return '{'.join(', ', map { $_.'='.( $caps->{$_} ? 'true' : 'false' ) } sort keys %$caps).'}'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | =encoding UTF-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | Langertha::Raider::Provider::Change - Internal classification of what changed between an accepted and a newly fetched provider manifest | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | version 0.503 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | # Internal to Langertha-Raider -- no API promise. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | my $class = 'Langertha::Raider::Provider::Change'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | my $got = $class->classify( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | old => $accepted_manifest, old_origin => 'https://provider.example', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | new => $fetched_manifest, new_origin => $report->{final_url}, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | # { needs_consent => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | # changes => [ { kind => 'endpoint_origin', consent => 1, endpoint => 'chat', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | # description => "endpoint 'chat': origin ... -> ..." }, ... ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | # old_fingerprint => '3f2a...', new_fingerprint => '9b1c...' } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | my $hex = $class->fingerprint($manifest, $origin); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | B<Internal module.> Its interface may change without notice. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | A provider manifest (ADR 0007) may change after the user accepted it. Not | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | every change is a new trust decision: a model list may change without | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | renegotiating anything, while a change of origin or auth mechanism must be | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | accepted again (C<docs/RAIDER-REDESIGN-HANDOFF.md> 11.2). This class tells | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | the two apart. It is pure logic: it stores nothing and asks nobody; keeping | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | an accepted manifest and asking again is the provider binding's job. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | B<The consent view> (L</consent_view>) is the part of a manifest a consent | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | covers. Every change to it needs renewed consent, every other change does | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | not -- so C<needs_consent> of L</classify> is true exactly when the two | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | L</fingerprint>s differ. The view holds: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | =over | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | =item * B<origin> -- the origin the manifest was fetched from. Another | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | origin is another party, whatever the document says. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | =item * B<issuer> -- compared as the exact string, as OpenID Connect | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | compares issuers: it is the identity the provider claims. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | =item * B<provider_id> -- the name the provider was accepted under and is | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | shown by. A manifest cannot rename itself under an existing consent. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | =item * B<every endpoint> by its id, with the B<origin> of its C<base_url> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | (where requests and the credential go), its B<dialect> (how raider talks to | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | it) and the B<type> of the auth entry its C<auth_ref> names (which | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | credential it asks for; C<undef> for none). Every endpoint counts, not only | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | the ones a model uses today: a model list change needs no consent and can put | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | any endpoint into use. An endpoint added or removed is a change to the view. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | Removing one narrows trust, but the accepted binding no longer describes the | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | provider, so it is asked again as well -- this keeps "needs consent" and | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | "fingerprint changed" the same statement. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | =back | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | Changes that need no consent, reported so nothing changes silently: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | =over | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | =item * the path of an endpoint's C<base_url> within the same origin | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | (C<endpoint_path>) -- the origin is the trust boundary, not the path; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | =item * the id of the auth entry an endpoint names when its type stays | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | (C<endpoint_auth_ref>) -- the id is a label, the mechanism is what counts; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | =item * auth entries no endpoint of the new manifest names (C<auth_added>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | C<auth_removed>, C<auth_type>) -- they reach no endpoint; one that does is | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | reported as the endpoint's C<endpoint_auth>; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | =item * models added or removed, also from one endpoint to another | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | (C<model_added>, C<model_removed>) -- a model entry is its id on its | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | endpoint; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | =item * a model's declared capabilities (C<model_capabilities>) -- a | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | capability is what the provider B<claims>, never what raider B<authorises> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | (ADR 0007: the four states stay separate; ADR 0005: permissions never come | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | from a manifest). It changes what raider sends to an origin already | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | accepted, not where anything goes; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | =item * C<extensions> -- inert in manifest v1. Once extensions carry | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | references to MCP servers or packs, installing, loading and running them | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | needs local policy of its own (ADR 0007). | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | =back | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | =head2 consent_view | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | my $view = $class->consent_view($manifest, $origin); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | The part of C<$manifest> (a L<Langertha::Manifest>) a consent covers, as | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | plain data (see L</DESCRIPTION>). C<$origin> is the origin -- or any URL of | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | it, such as the final URL of the fetch -- the manifest was fetched from. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | Croaks when C<$manifest> is not a manifest or C<$origin> names no host. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | =head2 fingerprint | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | my $hex = $class->fingerprint($manifest, $origin); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | The SHA-256 (hex) of the canonical JSON of L</consent_view> -- the | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | canonical form of L<Langertha::Raider::Approval/digest_arguments>: keys | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | sorted at every depth, UTF-8. The same for the same view whatever the key | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | order of the manifest document, the order of its endpoints, or any change | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | that needs no consent. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | =head2 classify | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | my $got = $class->classify( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | old => $accepted, old_origin => $accepted_origin, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | new => $fetched, new_origin => $fetched_origin, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | Compares an accepted manifest with a newly fetched one, each with the origin | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | it was fetched from. Resolves to a hash: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | =over | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | =item C<changes> -- one hash per change, in a stable order (origin, issuer, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | provider_id, endpoints by id, auth entries by id, models by endpoint and | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | id, extensions): C<kind>, C<consent> (C<1> or C<0>), C<description> (one | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | line for a person) and, where it applies, C<endpoint>, C<auth> or C<model> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | naming what changed. Empty when nothing changed. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | =item C<needs_consent> -- C<1> when any change needs renewed consent, else | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | C<0>. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | =item C<old_fingerprint>, C<new_fingerprint> -- the L</fingerprint>s; they | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | differ exactly when C<needs_consent> is C<1>. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | =back | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | Kinds that need consent: C<origin>, C<issuer>, C<provider_id>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | C<endpoint_added>, C<endpoint_removed>, C<endpoint_origin>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | C<endpoint_dialect>, C<endpoint_auth>. Kinds that do not: C<endpoint_path>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | C<endpoint_auth_ref>, C<auth_added>, C<auth_removed>, C<auth_type>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | C<model_added>, C<model_removed>, C<model_capabilities>, C<extensions>. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | Croaks on a missing or invalid argument. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | =over | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | =item * L<Langertha::Raider::Provider::Activation> -- C<raider --provider>, which accepts nothing beyond one run | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | =item * L<Langertha::Raider::Provider::Fetch> -- where a manifest and its origin come from | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | =item * L<Langertha::Manifest> -- the manifest's schema and validator (core) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | =back | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | =head2 Issues | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | Please report bugs and feature requests on GitHub at | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | L<https://github.com/Getty/langertha-raider/issues>. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | =head2 IRC | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | Join C<#langertha> on C<irc.perl.org> or message Getty directly. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | =head1 CONTRIBUTING | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | Contributions are welcome! Please fork the repository and submit a pull request. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | This software is copyright (c) 2026 by Torsten Raudssus. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||