---
name: "Net::OpenID::Extension"
section: "3pm"
platform: "linux"
package: "libnet-openid-common-perl"
version: "1.20-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Net::OpenID::Extension"
---

# Net::OpenID::Extension(3pm)

Base class for OpenID extensions

## NAME

Net::OpenID::Extension - Base class for OpenID extensions

## VERSION

version 1.20

## METHODS

### CLASS-\>namespace\_uris

Return a hashref mapping namespace URIs to the aliases you will use to refer to them in the other methods. For example:

```
    return {
        'http://example.com/some-extension' => 'someext',
    };
```

### CLASS-\>new\_request(@parameters)

When your extension is added to the Net::OpenID::ClaimedIdentity object in consumer-land, this method will be called to create a request object. Any additional arguments passed when adding the extension will be passed through verbatim in `@parameters`.

The object you return here should at minimum provide the interface defined in Net::OpenID::ExtensionMessage.

You can return `"undef"` here if you have nothing useful to return.

### CLASS-\>received\_request(\\%args)

In server-land, when a caller asks for the request object for your extension this method will be called to create a request object. `%args` maps the aliases you returned from the `"namespace_uris"` method to a hashref of the key-value pairs provided in that namespace.

The object you return here should at minimum provide the interface defined in Net::OpenID::ExtensionMessage, and should behave identically to the corresponding object returned from `"new_request"`.

You can return `"undef"` here if you have nothing useful to return.

### CLASS-\>new\_response(@parameters)

When your extension is added to the response in server-land, this method will be called to create a response object. Any additional arguments passed when adding the extension will be passed through verbatim in `@parameters`.

You can return `"undef"` here if you have nothing useful to return.

### CLASS-\>received\_response(\\%args)

In consumer-land, when a caller asks for the request object for your extension in Net::OpenID::VerifiedIdentity this method will be called to create a response object. `%args` maps the aliases you returned from the `"namespace_uris"` method to a hashref of the key-value pairs provided in that namespace.

You can return `"undef"` here if you have nothing useful to return.
