man Net::OpenID::ClaimedIdentity () - a not-yet-verified OpenID identity

NAME

Net::OpenID::ClaimedIdentity - a not-yet-verified OpenID identity

SYNOPSIS

  use Net::OpenID::Consumer;
  my $csr = Net::OpenID::Consumer->new;
  ....
  my $cident = $csr->claimed_identity("bradfitz.com")
    or die $csr->err;

  if ($AJAX_mode) {
    my $url = $cident->claimed_url;
    my $openid_server = $cident->identity_server;
    # ... return JSON with those to user agent (whose request was
    # XMLHttpRequest, probably)
  }

  if ($CLASSIC_mode) {
    my $check_url = $cident->check_url(
      delayed_return => 1,
      return_to      => "http://example.com/get-identity.app",
      trust_root     => "http://*.example.com/",
    );
    WebApp::redirect($check_url);
  }

DESCRIPTION

After Net::OpenID::Consumer crawls a user's declared identity URL and finds openid.server link tags in the HTML head, you get this object. It represents an identity that can be verified with OpenID (the link tags are present), but hasn't been actually verified yet.

METHODS

The URL, now canonicalized, that the user claims to own. You can't know whether or not they do own it yet until you send them off to the check_url, though. Returns the identity server that will assert whether or not this claimed identity is valid, and sign a message saying so. Makes the URL that you have to somehow send the user to in order to validate their identity. The options to put in CW%opts are: The URL that the identity server should redirect the user with either a verified identity signature -or- a user_setup_url (if the assertion couldn't be made). This URL may contain query parameters, and the identity server must preserve them. The URL that you want the user to actually see and declare trust for. Your CWreturn_to URL must be at or below your trust_root. Sending the trust_root is optional, and defaults to your CWreturn_to value, but it's highly recommended (and prettier for users) to see a simple trust_root. Note that the trust root may contain a wildcard at the beginning of the host, like CWhttp://*.example.com/ If set to a true value, the check_url returned will indicate to the user's identity server that it has permission to control the user's user-agent for awhile, giving them real pages (not just redirects) and lets them bounce around the identity server site for awhile until the requested assertion can be made, and they can finally be redirected back to your return_to URL above. The default value, false, means that the identity server will immediately return to your return_to URL with either a yes or no answer. In the no case, you'll instead have control of what to do, and you'll be sent the identity server's user_setup_url where you'll have to somehow send the user (be it link, redirect, or pop-up window). When writing a dynamic AJAX-style application, you can't use delayed_return because the remote site can't usefully take control of a 1x1 pixel hidden IFRAME, so you'll need to get the user_setup_url and present it to the user somehow.

COPYRIGHT, WARRANTY, AUTHOR

See Net::OpenID::Consumer for author, copyrignt and licensing information.

SEE ALSO

Net::OpenID::Consumer

Net::OpenID::VerifiedIdentity

Net::OpenID::Server

Website: <http://www.danga.com/openid/>