MMO\oauth
MMO\oauth · 25 symbols · generated 27 Oct 2026
actor
functions.php:44Who opened the current session as user (« Changer de compte », sudo.switchAccount).
- Namespace
MMO\oauth
b64UrlDecode
functions.php:328Decode a string with URL-safe Base64.
- Namespace
MMO\oauth
Call graph
b64UrlEncode
functions.php:319Encode a string with URL-safe Base64.
- Namespace
MMO\oauth
contentScopeID
functions.php:129- Namespace
MMO\oauth
decodeDER
functions.php:433Reads binary DER-encoded data and decodes into a single object
- Namespace
MMO\oauth
| $der | string | the binary data in DER format |
| returns | mixed | $data the decoded objects or null if nothing was found |
Call graph
Uses (1)
DERtoSignature
functions.php:504Encodes signature from a DER object.
- Namespace
MMO\oauth
| $der | string | binary signature in DER format |
| $keySize | int | the number of bits in the key |
| returns | string | the signature |
Call graph
Uses (1)
encodeDER
functions.php:390Encodes a value into a DER object.
- Namespace
MMO\oauth
| $value | mixed | the value to encode |
| $type = null | null | int | DER tag. if null, figure out the type from the value's type. |
| returns | string | the encoded object |
Call graph
encodeDERLength
functions.php:377DER-encode the length
- Namespace
MMO\oauth
Call graph
Used by (2)
entityScopeID
functions.php:105- Namespace
MMO\oauth
| $value = null | iRepository | iCollection | iEntity | null | |
| $action = '' | string | |
| returns | string |
generateKeys
functions.php:257Generate a private/public key pair using openssl sha512
- Namespace
MMO\oauth
getCSRFToken
functions.php:285Create a CRSF token
- Namespace
MMO\oauth
| $key | string | the session's key to save crsf token in |
| $privateKey = null | null | iPrivateKey | |
| returns | string | the csrf signature |
Call graph
Uses (2)
Used by (1)
GUIDv4
functions.php:353Generate valid version 4 UUIDS This function can serve to generate API keys
- Namespace
MMO\oauth
isAllAllowed
functions.php:202Test if all scopes are allowed Scopes expressed as string can be a list of scope's uid seperated by a space: each of them must be allowed too, as an OAuth2 scope parameter means.
- Namespace
MMO\oauth
isAllowed
functions.php:154Test if scope is allowed To compare two scopes, we look for any scopes containing the given one or one of its subset.
- Namespace
MMO\oauth
| $scopes | array | the current scopes |
| $uid | string | the scope's name |
| $default = false | null | bool | |
| $realUid = null | null | string | |
| returns | null | bool |
Call graph
Used by (22)
- tClient::blameOwnScope
- tClient::hasScope
- tUser::blameOwnScope
- tUser::hasScope
- tWithRoles::blameOwnScope
- tWithRoles::hasScope
- tWithScopes::blameScope
- tWithScopes::hasScope
- AccessController::hasUserScope
- AuthCode::blameScope
- AuthCode::hasScope
- Client::blameOwnScope
- Client::hasScope
- Role::blameScope
- Role::hasScope
- User::blameOwnScope
- User::hasScope
- GoogleUser::blameOwnScope
- GoogleUser::hasScope
- isAllAllowed
- isUserAllowed
- mergeScopes
isAnyAllowed
functions.php:185Test if at least one scope is allowed Scopes expressed as string can be a list of scope's uid seperated by a space (in this case, all scopes MUST be allowed).
- Namespace
MMO\oauth
| $scopes | array | array<uid: ?bool> |
| ...$uids | object | string | the scopes to test for |
| returns | bool | true when no scope is asked for |
isUserAllowed
functions.php:53- Namespace
MMO\oauth
Call graph
Used by (1)
logout
functions.php:23- Namespace
MMO\oauth
| returns | void |
Call graph
Uses (2)
Used by (1)
mergeScopes
functions.php:238Merge scopes into source.
- Namespace
MMO\oauth
| $source | array | scopes to merge into |
| $scopes | array | list of {scope:uid} => {allow:bool} |
| $set = false | bool | table rule to merge |
| returns | array |
Call graph
Uses (1)
Used by (15)
randomBytes
functions.php:343Generate a unique identifier in hexadecimal
- Namespace
MMO\oauth
| $length = null | null | int | the length in bytes. If null use the default length set in the package's config |
| $raw = false | bool | if true, don't encode in hexadecimal |
| returns | string | hexadecimal string |
Call graph
scopeID
functions.php:91Get the scope id for a given object
- Namespace
MMO\oauth
setUser
functions.php:49- Namespace
MMO\oauth
signatureToDER
functions.php:481Convert an ECDSA signature to an ASN.1 DER sequence
- Namespace
MMO\oauth
Call graph
Uses (1)
Used by (1)
user
functions.php:34Get current user set in the route This function MUST be called after middleware CurrentUser has been triggered.
- Namespace
MMO\oauth
Call graph
Used by (10)
- AccessController::getUser
- AccessController::onModesPreference
- AccessController::onNotificationRecipient
- AccessController::routeGetUserConfig
- AccessController::routePutUserConfig
- AccessController::routeScopes
- AccessController::routeScopesCatalog
- AccessController::sendPasswordReset
- ScopesList::__construct
- isUserAllowed
usersAllowed
functions.php:65The users whose rights allow $scope -- through their roles, their groups', their own scopes: who to notify of what only they can act on (a ticket to triage).
- Namespace
MMO\oauth
Call graph
Uses (1)
validateCSRFToken
functions.php:299Validate a CRSF token
- Namespace
MMO\oauth
| $key | string | the session's key to save crsf token in |
| $signature | string | the csrf signature |
| $publicKey = null | null | iPublicKey | a public key to verify the signature of the token |
| $clear = true | bool | if true, clear the crsf token from the session |
| returns | bool |