logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Lemonldap::NG::Portal::Lib::OpenIDConnect - Common OpenIDConnect functions

Authors

       LemonLDAP::NG team <http://lemonldap-ng.org/team>

Bug Report

       Use        OW2        system       to       report       bug       or       ask       for       features:
       <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>

Description

       This module contains common methods for OpenIDConnect authentication and user information loading

Download

       Lemonldap::NG is available at <https://lemonldap-ng.org/download>

Methods

loadOPs
       Load OpenID Connect Providers and JWKS data

   loadRPs
       Load OpenID Connect Relying Parties

   refreshJWKSdata
       Refresh JWKS data if needed

   getRP
       Get Relying Party corresponding to a Client ID

   getCallbackUri
       Compute callback URI

   buildAuthorizationCodeAuthnRequest
       Build Authentication Request URI for Authorization Code Flow

   buildAuthorizationCodeAuthnResponse
       Build Authentication Response URI for Authorization Code Flow

   buildImplicitAuthnResponse
       Build Authentication Response URI for Implicit Flow

   buildHybridAuthnResponse
       Build Authentication Response URI for Hybrid Flow

   getAuthorizationCodeAccessToken
       Get Token response with authorization code

   checkTokenResponseValidity
       Check validity of Token Response

   getUserInfo
       Get UserInfo response

   decodeJSON
       Convert JSON to HashRef

   newAuthorizationCode
       Generate new Authorization Code session

   newAccessToken
       Generate new Access Token session

   newRefreshToken
       Generate new Refresh Token session

   getAuthorizationCode
       Get existing Authorization Code session

   getAccessToken
       Get existing Access Token session

   getRefreshToken
       Get existing Refresh Token session

   getOpenIDConnectSession
       Try to recover the OpenID Connect session corresponding to id and return session

   storeState
       Store information in state database and return

   extractState
       Extract state information into $self

   verifyJWTSignature
       Check signature of a JWT

   verifyHash
       Check value hash

   createHash
       Create Hash

   returnBearerError
       Return Bearer error

   getEndPointAuthenticationCredentials
       Get Client ID and Client Secret

   getEndPointAccessToken
       Get Access Token

   getAttributesListFromClaim
       Return list of attributes authorized for a claim

   buildUserInfoResponseFromId
       Return Hash of UserInfo data from session ID

   buildUserInfoResponse
       Return Hash of UserInfo data from session object

   createJWT
       Return JWT

   createIDToken
       Return ID Token

   getFlowType
       Return flow type

   getIDTokenSub
       Return sub field of an ID Token

   getJWTJSONData
       Return payload of a JWT as Hash ref

   key2jwks
       Return JWKS representation of a key

   buildLogoutRequest
       Build Logout Request URI

   buildLogoutResponse
       Build Logout Response URI

   addRouteFromConf
       Build a Lemonldap::NG::Common::PSGI::Router route from OIDC configuration attribute

   validatePKCEChallenge
       Validate PKCE code challenge with given code challenge method

Name

       Lemonldap::NG::Portal::Lib::OpenIDConnect - Common OpenIDConnect functions

See Also

       Lemonldap::NG::Portal::AuthOpenIDConnect, Lemonldap::NG::Portal::UserDBOpenIDConnect

Synopsis

       use Lemonldap::NG::Portal::Lib::OpenIDConnect;

See Also