Lyo Kato > OpenID-Lite > OpenID::Lite::Relyingparty::Discover::Service

Download:
OpenID-Lite-0.01_04.tar.gz

Annotate this POD

Source  

NAME ^

OpenID::Lite::Relyingparty::Discover::Service - Discovered information

SYNOPSIS ^

    $service->url;
    $service->claimed_identifier
    $service->op_local_identifier
    $service->copy;
    $service->find_local_identifier;
    $service->is_op_identifier;
    $service->preferred_namespace;
    $service->requires_compatibility_mode;
    $service->has_type(  );
    $service->add_type();
    $service->has_uri();
    $service->add_uri();

DESCRIPTION ^

This class's object represents discovered information.

METHODS ^

new

    my $service = OpenID::Lite::RelyingParty::Discover::Service->new;

url

Returns service endpoint url.

    my $service_endpoint_url = $service->url;

add_type

Add a type of service the OP provides.

    use OpenID::Lite::Constants::Namespace qw( SERVER_2_0 SIGNON_2_0 );

    $service->add_type( SERVER_2_0 );
    $service->add_type( SIGNON_2_0 );

has_type

Check if the OP provides indicated type of service.

    use OpenID::Lite::Constants::Namespace qw( SERVER_2_0 );
    $service->has_type( SERVER_2_0 );

add_uri

Add endpoint uri

    $service->has_uri(q{http://yourapp.com/openid/endpoint});

has_uri

Check if the service includes indicated uri.

    if ( $service->has_uri( $endpoint_uri ) ) {
        ...
    }

claimed_identifier

Return claimed identitifier if it has. (When discovery is carried out with claimed_id)

    my $claimed_id = $service->claimed_identifier;

op_local_identifier

Return op local identitifier if it has. (When discovery is carried out with claimed_id and the response which OP returns includes LocalID)

    my $op_local_identifier = $service->op_local_identifier;

find_local_identifier

Returns op_local_identfier if it found. Or return claimed id.

    my $identity = $service->find_local_identifier;

copy

    my $copied_service = $service->copy();

is_op_identifier

Return true if this is for OP identifier (When discovery is carried out with OP identifier)

    if ( $service->is_op_identifier ) {
        ...
    }

preferred_namespace

Return proper namespace for openid.ns

requires_compatibility_mode

If the endpoint accepts only OpenID 1.x version protocol, return true.

AUTHOR ^

Lyo Kato, <lyo.kato@gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009 by Lyo Kato

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: