---
name: "OAuth::Lite2::ParamMethods"
section: "3pm"
platform: "linux"
package: "liboauth-lite2-perl"
version: "0.11-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/OAuth::Lite2::ParamMethods"
---

# OAuth::Lite2::ParamMethods(3pm)

store of builders/parsers for OAuth 2.0 parameters

## NAME

OAuth::Lite2::ParamMethods - store of builders/parsers for OAuth 2.0 parameters

## SYNOPSIS

```
    use OAuth::Lite2::ParamMethods qw(AUTH_HEADER FORM_BODY URI_QUERY);
    # client side
    my $builder = OAuth::Lite2::ParamMethods->get_request_builder( AUTH_HEADER );
    my $req = $builder->build_request(...);
    # server side
    my $parser = OAuth::Lite2::ParamMethods->get_param_parser( $plack_request )
        or $app->error("This is not OAuth 2.0 request");
    my ($token, $params) = $parser->parse( $plack_request );
```

## DESCRIPTION

Store of builders/parsers for OAuth 2.0 parameters

## CONSTANTS

- AUTH\_HEADER

  - FORM\_BODY

  - URI\_QUERY

  ## METHODS

### get\_param\_parser( $plack\_request )

Pass a Plack::Request object and proper parser for the request.

```
    my $parser = OAuth::Lite2::ParamMethods->get_param_parser( $plack_request )
        or $app->error("This is not OAuth 2.0 request");
    my ($token, $params) = $parser->parse( $plack_request );
```

### get\_request\_builder( $type )

Returns proper HTTP request builder for the passed `$type`.

```
    my $builder = OAuth::Lite2::ParamMethods->get_request_builder( AUTH_HEADER );
    my $req = $builder->build_request(...);
```

## SEE ALSO

OAuth::Lite2::ParamMethod::AuthHeader OAuth::Lite2::ParamMethod::FormEncodedBody OAuth::Lite2::ParamMethod::URIQueryParameter

## AUTHOR

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

## COPYRIGHT AND LICENSE

Copyright (C) 2010 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.
