Group
Extension

Matches 54

Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::Lib::Notifications::JSON;

use strict;
use Mouse;
use JSON qw(from_json);
use POSIX qw(strftime);

our $VERSION = '2.21.0';

no warnings 'redefine';

# Lemonldap::NG::Po
 my $file ( values %$notifs ) {
        my $json = eval { from_json( $file, { allow_nonref => 1 } ) };
        $self->userLogger->warn(
            "Bad JSON file: a notification for $uid was not done
@);
        my $j = 0;    # Notifications count
        $json = [$json] unless ( ref $json eq 'ARRAY' );
      LOOP: foreach my $notif ( @{$json} ) {

            # Get the reference
            my $r
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Plugins/OidcOfflineTokens.pm ( view source; MetaCPAN )
p::NG::Portal::Plugins::OidcOfflineTokens;

use strict;
use Mouse;
use Date::Parse;
use JSON qw(from_json to_json);
use Time::Local;
use Lemonldap::NG::Portal::Main::Constants qw(
  PE_OK
  PE_ERROR
 
    $req,
            "oidcOfflineTokens",
            params => {
                sessions => to_json($activeSessions),
                js       =>
                  "$self->{p}->{staticPrefix}/commo
 session $id");
    $session->remove( {
            hashStore => 0
        }
    );

    #TODO : Call BackChannelLogout if needed
    return $self->p->sendJSONresponse( $req, { result => 1 } );
}

1;
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm ( view source; MetaCPAN )
 decode_jwt);
use Digest::SHA qw/sha1 hmac_sha256_base64 sha256 sha384 sha512 sha256_base64/;
use JSON;
use Lemonldap::NG::Common::FormEncode;
use Lemonldap::NG::Common::OpenIDConnect::Constants;
use 
ity provider in configuration
    unless ( $self->conf->{oidcOPMetaDataJSON}
        and keys %{ $self->conf->{oidcOPMetaDataJSON} } )
    {
        $self->logger->warn(
            "No OpenID Connect
;
    }

    # Extract JSON data
    foreach ( keys %{ $self->conf->{oidcOPMetaDataJSON} } ) {
        my $op_conf =
          $self->decodeJSON( $self->conf->{oidcOPMetaDataJSON}->{$_} );
        if 
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/RESTProxy.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::Lib::RESTProxy;

use strict;
use JSON;
use Mouse;
use Lemonldap::NG::Common::UserAgent;
use Lemonldap::NG::Portal::Main::Constants qw(
  URIRE
  PE_OK
  PE_ERROR
  PE_BA
G::Common::UserAgent->new( $self->conf ) );
    $self->ua->default_header( Accept => 'application/json' );
    $self->cookieName( $self->conf->{proxyCookieName}
          || $self->conf->{cookieName} 
turn PE_ERROR;
    }
    $self->logger->debug('Proxy gets a response');
    my $res = eval { JSON::from_json( $resp->content, { allow_nonref => 1 } ) };
    if ($@) {
        $self->logger->error("Bad
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/REST.pm ( view source; MetaCPAN )
G::Portal::Lib::REST;

use strict;
use Mouse;
use Lemonldap::NG::Common::UserAgent;
use JSON qw(from_json to_json);

our $VERSION = '2.0.6';

has ua => (
    is      => 'rw',
    lazy    => 1,
    def
application/json' );
    $hreq->content( to_json($content) );
    my $resp = $self->ua->request($hreq);
    die $resp->status_line unless $resp->is_success;

    my $res = eval { from_json( $resp->con
tent ) };
    die "Bad REST response: $@" if ($@);
    if ( ref($res) ne "HASH" ) {
        die "Bad REST response: expecting a JSON HASH, got " . ref($res);
    }
    return $res;
}

1;
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/SMTP.pm ( view source; MetaCPAN )
SMTP common functions
package Lemonldap::NG::Portal::Lib::SMTP;

use strict;
use Mouse;
use JSON qw(from_json);
use MIME::Entity;
use Lemonldap::NG::Common::EmailAddress qw(format_email);
use Email::S
   my $json      = $self->conf->{templateDir} . "/common/mail/$lang_code.json";
    $json = $self->conf->{templateDir} . '/common/mail/en.json'
      unless ( -f $json );
    open F, '<', $json
      
code.json or $self->{conf}->{templateDir}/common/mail/en.json)";
    $json = join '', <F>;
    close F;
    my $lang = from_json( $json, { allow_nonref => 1 } );
    my $langOver =
      from_json( $s
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/WebAuthn.pm ( view source; MetaCPAN )
ict;
use Mouse::Role;
use MIME::Base64 qw(encode_base64url decode_base64url);
use JSON qw(decode_json from_json to_json);
use Digest::SHA qw(sha256);
use URI;
use Carp;
with 'Lemonldap::NG::Portal::Li
id} = $appid;
    }

    $self->logger->debug(
        "WebAuthn authentication parameters " . to_json($challenge) );

    return $challenge;
}

sub _formatCredentialForRequest {
    my ( $self, $cred
sicChallenge($req);

    $self->logger->debug(
        "WebAuthn authentication parameters " . to_json($challenge) );

    return $challenge;
}

sub _generateBasicChallenge {
    my ( $self, $req ) = 
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/2fDevices.pm ( view source; MetaCPAN )
ODS

=over

=cut

use strict;
use Mouse::Role;
use Lemonldap::NG::Common::Util qw/display2F/;
use JSON;

requires qw(p conf logger);

our $VERSION = '2.21.0';

=item update2fDevice

Updates one field 
    if (@found) {
        $self->p->updatePersistentSession( $req,
            { _2fDevices => to_json($_2fDevices) }, $user );
        return 1;
    }
    return 0;
}

=item add2fDevice

Store a new 
isplay2F($device),
    );
    $self->p->updatePersistentSession( $req,
        { _2fDevices => to_json($_2fDevices) } );
    return 1;
}

=item del2fDevices

Delete the devices specified in the @$devi
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Plugins/GlobalLogout.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::Plugins::GlobalLogout;

use strict;
use Mouse;
use JSON qw(from_json to_json);
use Time::Local;
use Lemonldap::NG::Common::Session 'id2storage';
use Lemonldap::NG::Porta
 my $token = $self->ott->createToken( {
            user     => $user,
            sessions => to_json($sessions)
        }
    );

    # Prepare form
    $self->logger->debug("Prepare global logout c
f->{globalLogoutCustomParam}
        }
    );

    $req->response(
        $req->wantJSON
        ? $self->sendJSONresponse( $req,
            { globalLogout => $nbr, confirmationRequired => 1 } )
   
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Main/Display.pm ( view source; MetaCPAN )
splay;

our $VERSION = '2.22.0';

package Lemonldap::NG::Portal::Main;
use strict;
use Mouse;
use JSON;
use URI;

has speChars                 => ( is => 'rw' );
has skinRules                => ( is =
s;
    if ( exists $session->{_oidcConsents} ) {
        $_oidcConsents = eval {
            from_json( $session->{_oidcConsents}, { allow_nonref => 1 } );
        };
        if ($@) {
            $se
PPOLICY_ALLOWEDSPECHAR => $self->speChars(),
                PPOLICY_ALLOWEDSPECHAR_JSON =>
                  to_json( $self->speChars(), { allow_nonref => 1 } ),
              )
            : ()
    
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Main/Init.pm ( view source; MetaCPAN )

            $self->conf->{$k} = $self->localConfig->{$k};
        }
    }
    $self->trOver( JSON::to_json( $self->trOver ) );

    # Purge loaded module list
    $self->_resetPluginsAndServices;

  
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::Lib::OneTimeToken;

use strict;
use Mouse;
use JSON qw(from_json to_json);
use Crypt::URandom;

our $VERSION = '2.22.0';

extends 'Lemonldap::NG::Common::Module';

has t
m(2) );

        # Dereference $infos
        my %h = %$infos;
        $self->cache->set( $id, to_json( \%h ), $self->timeout . ' s' );
        $self->logger->debug("Token $id created");
        retur
    return undef;
        }
        $self->cache->remove($id) unless ($keep);
        return from_json( $data, { allow_nonref => 1 } );
    }
    else {

        # Get token session
        my $tsessi
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Lib/Choice.pm ( view source; MetaCPAN )
      . $mods[$type];
        my $over;
        if ( $mods[5] ) {
            eval { $over = JSON::from_json( $mods[5] ) };
            if ($@) {
                $self->logger->error("Bad over value (
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Password/REST.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::Password::REST;

use strict;
use Mouse;
use JSON;
use Lemonldap::NG::Portal::Main::Constants qw(
  PE_ERROR
  PE_PASSWORD_OK
);

extends qw(
  Lemonldap::NG::Portal::Lib
{useMail} ? 'mail' : 'user' ) => $req->user,
                useMail  => ( $args{useMail} ? JSON::true : JSON::false ),
                password => $pwd
            }
        );
    };
    if ($@) {
 
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Plugins/CheckDevOps.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::Plugins::CheckDevOps;

use strict;
use Mouse;
use JSON qw(from_json);
use Lemonldap::NG::Common::UserAgent;
use Lemonldap::NG::Common::Util qw(isHiddenAttr);
use Lemonld
->ott->createToken()
            : ''
        )
    };
    return $self->sendJSONresponse( $req, $params ) if $req->wantJSON;

    # Display form
    return $self->p->sendHtml( $req, 'checkdevops', pa
$req ) = @_;
    my ( $headers, $rules, $unknown ) = ( [], [], [] );
    my ( $msg,     $json,  $url, $bad_json );
    my $alert = 'alert-danger';

    # Check token
    if ( $self->ottRule->( $req, {
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm ( view source; MetaCPAN )
er->debug('Initialize Kerberos dialog');

        # Case 1.1: Ajax request
        if ( $req->wantJSON ) {
            $req->response( [
                    401,
                    [
                
    'WWW-Authenticate' => 'Negotiate',
                        'Content-Type'     => 'application/json',
                        'Content-Length'   => 35
                    ],
                    ['{
  [
            'WWW-Authenticate' => 'Negotiate',
            'Content-Type'     => 'application/json',
            'Content-Length'   => 35
        ],
        ['{"error":"Authentication required"}']
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, GUIMARD, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Plugins/Status.pm ( view source; MetaCPAN )

# by category

package Lemonldap::NG::Portal::Plugins::Status;

use strict;
use Mouse;
use JSON qw(from_json);
use MIME::Base64;
use IO::Socket::INET;

our $VERSION = '2.0.10';

extends 'Lemonldap::N
int("STATUS json=1$args\n");
        while ( $_ = $out->getline ) {
            last if (/^END$/);
            $buf .= $_;
        }
        if ($buf) {
            eval { $res = from_json( $buf, { al
 1 } ) };
            if ($@) {
                $self->logger->error("JSON error: $@");
                $self->logger->error("JSON: $buf");
            }
            foreach (qw(total average)) {
    
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Plugins/CheckHIBP.pm ( view source; MetaCPAN )
new user password, flag noJSONResponse
# Output: JSON response, including a code.
# code = 0 = success
# code > 0 = error
sub _checkHIBP {
    my ( $self, $req, $pass, $noJSONResponse ) = @_;
    my $
sage"} = "missing parameter password";

            return $noJSONResponse
              ? $response_params
              : $self->sendJSONresponse( $req, $response_params );
        }
        $passwo
mpromised $num times";

                    return $noJSONResponse
                      ? $response_params
                      : $self->sendJSONresponse( $req, $response_params );
                }
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/UserDB/REST.pm ( view source; MetaCPAN )
package Lemonldap::NG::Portal::UserDB::REST;

use strict;
use Mouse;
use JSON qw(from_json to_json);
use Lemonldap::NG::Portal::Main::Constants qw(
  PE_OK
  PE_ERROR
  PE_USERNOTFOUND
  PE_BADCREDENT
useMail} ? 'mail' : 'user' ) => $req->user,
                'useMail' => ( $args{useMail} ? JSON::true : JSON::false ),

            }
        );
    };
    if ($@) {
        $self->logger->error("Use
          searchingAttributes => to_json($searching),
                (
                    scalar @$excluding
                    ? ( excludingAttributes => to_json($excluding) )
                    
Lemonldap-NG-Portal ( C/CO/COUDOT/Lemonldap-NG-Portal-2.22.0.tar.gz, COUDOT, 2025; MetaCPAN )
Lemonldap-NG-Portal/lib/Lemonldap/NG/Portal/Plugins/MailPasswordReset.pm ( view source; MetaCPAN )
rtal::Plugins::MailPasswordReset;

use strict;
use Encode;
use Mouse;
use POSIX qw(strftime);
use JSON;
use Lemonldap::NG::Common::FormEncode;
use Lemonldap::NG::Portal::Main::Constants qw(
  PE_OK
  

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.