blib/lib/WebService/Mattermost/V4/API/Resource/SAML.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 16 | 75.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 6 | 66.6 |
pod | 1 | 1 | 100.0 |
total | 17 | 23 | 73.9 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package WebService::Mattermost::V4::API::Resource::SAML; 2: 3: # ABSTRACT: Wrapped API methods for the SAML API endpoints. 4: 5: use Moo; 6: use Types::Standard 'InstanceOf'; 7: 8: use WebService::Mattermost::V4::API::Resource::SAML::Certificate; 9: use WebService::Mattermost::Helper::Alias 'v4'; 10: 11: extends 'WebService::Mattermost::V4::API::Resource'; 12: 13: ################################################################################ 14: 15: has certificate => (is => 'ro', isa => InstanceOf[v4 'SAML::Certificate'], lazy => 1, builder => 1); 16: 17: ################################################################################ 18: 19: sub metadata { 20: my $self = shift; 21: 22: return $self->_get({ endpoint => 'metadata' }); 23: } 24: 25: ################################################################################ 26: 27: sub _build_certificate { 28: my $self = shift; 29: 30: return $self->new_related_resource('saml', 'SAML::Certificate'); 31: } 32: 33: ################################################################################ 34: 35: 1; 36: 37: __END__ 38: 39: =pod 40: 41: =encoding UTF-8 42: 43: =head1 NAME 44: 45: WebService::Mattermost::V4::API::Resource::SAML - Wrapped API methods for the SAML API endpoints. 46: 47: =head1 VERSION 48: 49: version 0.30 50: 51: =head1 DESCRIPTION 52: 53: =head2 USAGE 54: 55: use WebService::Mattermost; 56: 57: my $mm = WebService::Mattermost->new({ 58: authenticate => 1, 59: username => 'me@somewhere.com', 60: password => 'hunter2', 61: base_url => 'https://my.mattermost.server.com/api/v4/', 62: }); 63: 64: my $resource = $mm->api->saml; 65: 66: =head2 METHODS 67: 68: =over 4 69: 70: =item C<metadata()> 71: 72: Get SAML metadata from the server. 73: 74: =back 75: 76: =head2 ATTRIBUTES 77: 78: =over 4 79: 80: =item C<certificate> 81: 82: An instance of L<WebService::Mattermost::V4::API::Resource::SAML::Certificate>, 83: which handles getting and setting of certificates (IDP, public and private). 84: 85: =back 86: 87: =head1 SEE ALSO 88: 89: =over 4 90: 91: =item L<Official SAML documentation|https://api.mattermost.com/#tag/SAML> 92: 93: =back 94: 95: =head1 AUTHOR 96: 97: Mike Jones <mike@netsplit.org.uk> 98: 99: =head1 COPYRIGHT AND LICENSE 100: 101: This software is Copyright (c) 2023 by Mike Jones. 102: 103: This is free software, licensed under: 104: 105: The MIT (X11) License 106: 107: =cut 108: |