OneLogin client implementation
| package | Default |
|---|
__construct($clientId, $clientSecret, $region= "us", $maxResults= 1000)
assignRoleToUser(\OneLogin\api\id $id, \OneLogin\api\roleIds $roleIds) : true
| see | Assign Role to User documentation |
|---|
\OneLogin\api\idId of the user to be modified
\OneLogin\api\roleIdsSet to an array of one or more role IDs.
trueif successcleanError()
createEvent(\OneLogin\api\eventParams $eventParams)
| see | Create Event documentation |
|---|
\OneLogin\api\eventParamsEvent Data (event_type_id, account_id, actor_system, actor_user_id, actor_user_name, app_id, assuming_acting_user_id, custom_message, directory_sync_run_id, group_id, group_name, ipaddr, otp_device_id, otp_device_name, policy_id, policy_name, role_id, role_name, user_id, user_name)
createSessionLoginToken(\OneLogin\api\queryParams $queryParams, \OneLogin\api\allowedOrigin $allowedOrigin = '') : \OneLogin\api\models\SessionTokenInfo
A session login token expires two minutes after creation.
| see | Create Session Login Token documentation |
|---|
\OneLogin\api\queryParamsQuery Parameters (username_or_email, password, subdomain, return_to_url, ip_address, browser_id)
\OneLogin\api\allowedOriginCustom-Allowed-Origin-Header. Required for CORS requests only. Set to the Origin URI from which you are allowed to send a request using CORS.
\OneLogin\api\models\SessionTokenInfoor SessionTokenMFAInfo object if successcreateSessionViaToken(\OneLogin\api\sessionToken $sessionToken) : \OneLogin\api\Header
| see | Create Session Via API Token documentation |
|---|
\OneLogin\api\sessionTokenThe session token
\OneLogin\api\Header'Set-Cookie' valuecreateUser(\OneLogin\api\userParams $userParams) : \OneLogin\api\Created
| see | Create User documentation |
|---|
\OneLogin\api\userParamsUser data (firstname, lastname, email, username, company, department, directory_id, distinguished_name, external_id, group_id, invalid_login_attempts, locale_code, manager_ad_id, member_of, openid_name, phone, samaccountname, title, userprincipalname)
\OneLogin\api\CreatedUserdeleteUser(\OneLogin\api\id $id) : true
| see | Delete User by ID documentation |
|---|
\OneLogin\api\idId of the user to be deleted
trueif successgenerateInviteLink(\OneLogin\api\email $email) : String
| see | Generate Invite Link documentation |
|---|
\OneLogin\api\emailSet the email address of the user that you want to generate an invite link for.
Stringwith the linkgetAccessToken()
getCustomAttributes() : \OneLogin\api\List
getEmbedApps(\OneLogin\api\token $token, \OneLogin\api\email $email) : \OneLogin\api\A
| see | Get Apps to Embed for a User documentation |
|---|
\OneLogin\api\tokenProvide your embedding token.
\OneLogin\api\emailProvide the email of the user for which you want to return a list of embeddable apps.
\OneLogin\api\Alist of AppsgetError()
getErrorDescription()
getEvent(\OneLogin\api\id $id) : \OneLogin\api\models\Event
| see | Get Event by ID documentation |
|---|
\OneLogin\api\idId of the event
\OneLogin\api\models\EventgetEventTypes() : \OneLogin\api\List
getEvents(\OneLogin\api\queryParameters $queryParameters= null, \OneLogin\api\maxResults $maxResults= null) : \OneLogin\api\List
| see | Get Events documentation |
|---|
\OneLogin\api\queryParametersParameters to filter the result of the list
\OneLogin\api\maxResultsLimit the number of events returned (optional)
\OneLogin\api\Listof EventgetGroup(\OneLogin\api\id $id) : \OneLogin\api\models\Group
| see | Get Group by ID documentation |
|---|
\OneLogin\api\idId of the group
\OneLogin\api\models\GroupgetGroups(\OneLogin\api\maxResults $maxResults = null) : \OneLogin\api\List
| see | Get Groups documentation |
|---|
\OneLogin\api\maxResultsLimit the number of groups returned (optional)
\OneLogin\api\Listof GroupgetRateLimit() : \OneLogin\api\models\RateLimit
getRole(\OneLogin\api\id $id) : \OneLogin\api\models\Role
| see | Get Role by ID documentation |
|---|
\OneLogin\api\idId of the role
\OneLogin\api\models\RolegetRoles(\OneLogin\api\queryParameters $queryParameters = null) : \OneLogin\api\List
| see | Get Roles documentation |
|---|
\OneLogin\api\queryParametersParameters to filter the result of the list
\OneLogin\api\Listof RolegetSAMLAssertion(\OneLogin\api\usernameOrEmail $usernameOrEmail, \OneLogin\api\password $password, \OneLogin\api\appId $appId, \OneLogin\api\subdomain $subdomain, \OneLogin\api\ipAddress $ipAddress = null) : \OneLogin\api\models\SAMLEndpointResponse
| see | Generate SAML Assertion documentation |
|---|
\OneLogin\api\usernameOrEmailusername or email of the OneLogin user accessing the app
\OneLogin\api\passwordPassword of the OneLogin user accessing the app
\OneLogin\api\appIdApp ID of the app for which you want to generate a SAML token
\OneLogin\api\subdomainsubdomain of the OneLogin account related to the user/app
\OneLogin\api\ipAddresswhitelisted IP address that needs to be bypassed (some MFA scenarios).
\OneLogin\api\models\SAMLEndpointResponsegetSessionTokenVerified(\OneLogin\api\devideId $devideId, \OneLogin\api\stateToken $stateToken, \OneLogin\api\otpToken $otpToken = null) : \OneLogin\api\Session
| see | Verify Factor documentation |
|---|
\OneLogin\api\devideIdProvide the MFA device_id you are submitting for verification.
\OneLogin\api\stateTokenProvide the state_token associated with the MFA device_id you are submitting for verification.
\OneLogin\api\otpTokenProvide the OTP value for the MFA factor you are submitting for verification.
\OneLogin\api\SessionTokengetUrl($base, $id = null)
getUser(\OneLogin\api\id $id) : \OneLogin\api\models\User
| see | Get User by ID documentation |
|---|
\OneLogin\api\idId of the user
\OneLogin\api\models\UsergetUserApps(\OneLogin\api\id $id) : \OneLogin\api\List
| see | Get Apps for a User documentation |
|---|
\OneLogin\api\idId of the user
\OneLogin\api\Listof AppsgetUserRoles(\OneLogin\api\id $id) : \OneLogin\api\List
| see | Get Roles for a User documentation |
|---|
\OneLogin\api\idId of the role
\OneLogin\api\Listof Role IdsgetUsers(\OneLogin\api\queryParameters $queryParameters= null, \OneLogin\api\maxResults $maxResults= null) : Array
| see | Get Users documentation |
|---|
\OneLogin\api\queryParametersParameters to filter the result of the list
\OneLogin\api\maxResultsLimit the number of users returned (optional)
Arrayof UserisExpired()
lockUser(\OneLogin\api\id $id, \OneLogin\api\minutes $minutes) : true
| see | Lock User Account documentation |
|---|
\OneLogin\api\idId of the user to be locked
\OneLogin\api\minutesSet to the number of minutes for which you want to lock the user account. (0 to delegate on policy)
trueif successlogUserOut(\OneLogin\api\id $id) : true
| see | Log User Out documentation |
|---|
\OneLogin\api\idId of the user to be logged out
trueif successrefreshToken()
removeRoleFromUser(\OneLogin\api\id $id, \OneLogin\api\roleIds $roleIds) : true
| see | Remove Role from User documentation |
|---|
\OneLogin\api\idId of the user to be modified
\OneLogin\api\roleIdsSet to an array of one or more role IDs.
trueif successretrieveAppsFromXML($xmlContent)
sendInviteLink(\OneLogin\api\email $email, \OneLogin\api\personal_email $personalEmail = null) : True
| see | Send Invite Link documentation |
|---|
\OneLogin\api\emailSet to the email address of the user that you want to send an invite link for.
\OneLogin\api\personal_emailIf you want to send the invite email to an email other than the one provided in email, provide it here. The invite link will be sent to this address instead.
Trueif the mail with the link was sentsetCustomAttributeToUser(\OneLogin\api\id $id, \OneLogin\api\customAttributes $customAttributes) : true
| see | Set Custom Attribute Value documentation |
|---|
\OneLogin\api\idId of the user to be modified
\OneLogin\api\customAttributesProvide one or more key value pairs composed of the custom attribute field shortname and the value that you want to set the field to.
trueif successsetPasswordUsingClearText(\OneLogin\api\id $id, \OneLogin\api\password $password, \OneLogin\api\passwordConfirmation $passwordConfirmation) : true
| see | Set Password by ID Using Cleartext documentation |
|---|
\OneLogin\api\idId of the user to be modified
\OneLogin\api\passwordSet to the password value using cleartext.
\OneLogin\api\passwordConfirmationEnsure that this value matches the password value exactly.
trueif successsetPasswordUsingHashSalt(\OneLogin\api\id $id, \OneLogin\api\password $password, \OneLogin\api\passwordConfirmation $passwordConfirmation, \OneLogin\api\passwordAlgorithm $passwordAlgorithm, \OneLogin\api\passwordSalt $passwordSalt = null) : true
| see | Set Password by ID Using Salt and SHA-256 documentation |
|---|
\OneLogin\api\idId of the user to be modified
\OneLogin\api\passwordSet to the password value using a SHA-256-encoded value.
\OneLogin\api\passwordConfirmationThis value must match the password value.
\OneLogin\api\passwordAlgorithmSet to salt+sha256.
\OneLogin\api\passwordSaltTo provide your own salt value.
trueif successupdateUser(\OneLogin\api\id $id, \OneLogin\api\userParams $userParams) : \OneLogin\api\Updated
| see | Update User by ID documentation |
|---|
\OneLogin\api\idId of the user to be modified
\OneLogin\api\userParamsUser data (firstname, lastname, email, username, company, department, directory_id, distinguished_name, external_id, group_id, invalid_login_attempts, locale_code, manager_ad_id, member_of, openid_name, phone, samaccountname, title, userprincipalname)
\OneLogin\api\UpdatedUserextractErrorMessageFromResponse($response)
getAfterCursor($response)
getAuthorization($bearer = true)
getAuthorizedHeader($bearer = true)
getBeforeCursor($response)
handleDataResponse($response)
handleOperationResponse($response)
handleSAMLEndpointResponse($response)
handleSessionTokenResponse($response)
handleTokenResponse($response)
prepareToken()
$clientID : string
$clientSecret : string
$maxResults : integer
$urlBuilder : \OneLogin\api\[Object]
$userAgent : string
$accessToken : string
$client : \OneLogin\api\GuzzleHttp\Client
$error : string
$errorDescription : string
$expiration : \OneLogin\api\DateTime
$refreshToken : string
CUSTOM_USER_AGENT = "onelogin-php-sdk " . \OneLogin\api\OneLoginClient::VERSION
VERSION = "1.0.0"