| 1 | package WebService::Mattermost::V4::API::Resource::SAML; | ||
| 2 | |||
| 3 | # ABSTRACT: Wrapped API methods for the SAML API endpoints. | ||
| 4 | |||
| 5 | 12 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 12 | ▶ | use Types::Standard 'InstanceOf'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 12 | ▶ | use WebService::Mattermost::V4::API::Resource::SAML::Certificate; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 12 | ▶ | use WebService::Mattermost::Helper::Alias 'v4'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 12 | extends 'WebService::Mattermost::V4::API::Resource'; | |
| 12 | |||
| 13 | ################################################################################ | ||
| 14 | |||
| 15 | 12 | has certificate => (is => 'ro', isa => InstanceOf[v4 'SAML::Certificate'], lazy => 1, builder => 1); | |
| 16 | |||
| 17 | ################################################################################ | ||
| 18 | |||
| 19 | sub metadata { | ||
| 20 | 0 | ▶ | my $self = shift; |
|
Subroutine
metadata: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | |||
| 22 | 0 | return $self->_get({ endpoint => 'metadata' }); | |
| 23 | } | ||
| 24 | |||
| 25 | ################################################################################ | ||
| 26 | |||
| 27 | sub _build_certificate { | ||
| 28 | 0 | ▶ | my $self = shift; |
|
Subroutine
_build_certificate: not called CC=1 SCAR=6.9
| |||
| 29 | |||
| 30 | 0 | return $self->new_related_resource('saml', 'SAML::Certificate'); | |
| 31 | } | ||
| 32 | |||
| 33 | ################################################################################ | ||
| 34 | |||
| 35 | 12 | 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.28 | ||
| 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) 2020 by Mike Jones. | ||
| 102 | |||
| 103 | This is free software, licensed under: | ||
| 104 | |||
| 105 | The MIT (X11) License | ||
| 106 | |||
| 107 | =cut | ||