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\id
Id of the user to be modified
\OneLogin\api\roleIds
Set to an array of one or more role IDs.
true
if successcleanError()
createEvent(\OneLogin\api\eventParams $eventParams)
see | Create Event documentation |
---|
\OneLogin\api\eventParams
Event 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\queryParams
Query Parameters (username_or_email, password, subdomain, return_to_url, ip_address, browser_id)
\OneLogin\api\allowedOrigin
Custom-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\SessionTokenInfo
or SessionTokenMFAInfo object if successcreateSessionViaToken(\OneLogin\api\sessionToken $sessionToken) : \OneLogin\api\Header
see | Create Session Via API Token documentation |
---|
\OneLogin\api\sessionToken
The session token
\OneLogin\api\Header
'Set-Cookie' valuecreateUser(\OneLogin\api\userParams $userParams) : \OneLogin\api\Created
see | Create User documentation |
---|
\OneLogin\api\userParams
User 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\Created
UserdeleteUser(\OneLogin\api\id $id) : true
see | Delete User by ID documentation |
---|
\OneLogin\api\id
Id of the user to be deleted
true
if successgenerateInviteLink(\OneLogin\api\email $email) : String
see | Generate Invite Link documentation |
---|
\OneLogin\api\email
Set the email address of the user that you want to generate an invite link for.
String
with 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\token
Provide your embedding token.
\OneLogin\api\email
Provide the email of the user for which you want to return a list of embeddable apps.
\OneLogin\api\A
list of AppsgetError()
getErrorDescription()
getEvent(\OneLogin\api\id $id) : \OneLogin\api\models\Event
see | Get Event by ID documentation |
---|
\OneLogin\api\id
Id of the event
\OneLogin\api\models\Event
getEventTypes() : \OneLogin\api\List
getEvents(\OneLogin\api\queryParameters $queryParameters= null
, \OneLogin\api\maxResults $maxResults= null
) : \OneLogin\api\List
see | Get Events documentation |
---|
\OneLogin\api\queryParameters
Parameters to filter the result of the list
\OneLogin\api\maxResults
Limit the number of events returned (optional)
\OneLogin\api\List
of EventgetGroup(\OneLogin\api\id $id) : \OneLogin\api\models\Group
see | Get Group by ID documentation |
---|
\OneLogin\api\id
Id of the group
\OneLogin\api\models\Group
getGroups(\OneLogin\api\maxResults $maxResults = null
) : \OneLogin\api\List
see | Get Groups documentation |
---|
\OneLogin\api\maxResults
Limit the number of groups returned (optional)
\OneLogin\api\List
of GroupgetRateLimit() : \OneLogin\api\models\RateLimit
getRole(\OneLogin\api\id $id) : \OneLogin\api\models\Role
see | Get Role by ID documentation |
---|
\OneLogin\api\id
Id of the role
\OneLogin\api\models\Role
getRoles(\OneLogin\api\queryParameters $queryParameters = null
) : \OneLogin\api\List
see | Get Roles documentation |
---|
\OneLogin\api\queryParameters
Parameters to filter the result of the list
\OneLogin\api\List
of 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\usernameOrEmail
username or email of the OneLogin user accessing the app
\OneLogin\api\password
Password of the OneLogin user accessing the app
\OneLogin\api\appId
App ID of the app for which you want to generate a SAML token
\OneLogin\api\subdomain
subdomain of the OneLogin account related to the user/app
\OneLogin\api\ipAddress
whitelisted IP address that needs to be bypassed (some MFA scenarios).
\OneLogin\api\models\SAMLEndpointResponse
getSessionTokenVerified(\OneLogin\api\devideId $devideId, \OneLogin\api\stateToken $stateToken, \OneLogin\api\otpToken $otpToken = null
) : \OneLogin\api\Session
see | Verify Factor documentation |
---|
\OneLogin\api\devideId
Provide the MFA device_id you are submitting for verification.
\OneLogin\api\stateToken
Provide the state_token associated with the MFA device_id you are submitting for verification.
\OneLogin\api\otpToken
Provide the OTP value for the MFA factor you are submitting for verification.
\OneLogin\api\Session
TokengetUrl($base, $id = null
)
getUser(\OneLogin\api\id $id) : \OneLogin\api\models\User
see | Get User by ID documentation |
---|
\OneLogin\api\id
Id of the user
\OneLogin\api\models\User
getUserApps(\OneLogin\api\id $id) : \OneLogin\api\List
see | Get Apps for a User documentation |
---|
\OneLogin\api\id
Id of the user
\OneLogin\api\List
of AppsgetUserRoles(\OneLogin\api\id $id) : \OneLogin\api\List
see | Get Roles for a User documentation |
---|
\OneLogin\api\id
Id of the role
\OneLogin\api\List
of Role IdsgetUsers(\OneLogin\api\queryParameters $queryParameters= null
, \OneLogin\api\maxResults $maxResults= null
) : Array
see | Get Users documentation |
---|
\OneLogin\api\queryParameters
Parameters to filter the result of the list
\OneLogin\api\maxResults
Limit the number of users returned (optional)
Array
of UserisExpired()
lockUser(\OneLogin\api\id $id, \OneLogin\api\minutes $minutes) : true
see | Lock User Account documentation |
---|
\OneLogin\api\id
Id of the user to be locked
\OneLogin\api\minutes
Set to the number of minutes for which you want to lock the user account. (0 to delegate on policy)
true
if successlogUserOut(\OneLogin\api\id $id) : true
see | Log User Out documentation |
---|
\OneLogin\api\id
Id of the user to be logged out
true
if successrefreshToken()
removeRoleFromUser(\OneLogin\api\id $id, \OneLogin\api\roleIds $roleIds) : true
see | Remove Role from User documentation |
---|
\OneLogin\api\id
Id of the user to be modified
\OneLogin\api\roleIds
Set to an array of one or more role IDs.
true
if successretrieveAppsFromXML($xmlContent)
sendInviteLink(\OneLogin\api\email $email, \OneLogin\api\personal_email $personalEmail = null
) : True
see | Send Invite Link documentation |
---|
\OneLogin\api\email
Set to the email address of the user that you want to send an invite link for.
\OneLogin\api\personal_email
If 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.
True
if the mail with the link was sentsetCustomAttributeToUser(\OneLogin\api\id $id, \OneLogin\api\customAttributes $customAttributes) : true
see | Set Custom Attribute Value documentation |
---|
\OneLogin\api\id
Id of the user to be modified
\OneLogin\api\customAttributes
Provide one or more key value pairs composed of the custom attribute field shortname and the value that you want to set the field to.
true
if successsetPasswordUsingClearText(\OneLogin\api\id $id, \OneLogin\api\password $password, \OneLogin\api\passwordConfirmation $passwordConfirmation) : true
see | Set Password by ID Using Cleartext documentation |
---|
\OneLogin\api\id
Id of the user to be modified
\OneLogin\api\password
Set to the password value using cleartext.
\OneLogin\api\passwordConfirmation
Ensure that this value matches the password value exactly.
true
if 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\id
Id of the user to be modified
\OneLogin\api\password
Set to the password value using a SHA-256-encoded value.
\OneLogin\api\passwordConfirmation
This value must match the password value.
\OneLogin\api\passwordAlgorithm
Set to salt+sha256.
\OneLogin\api\passwordSalt
To provide your own salt value.
true
if successupdateUser(\OneLogin\api\id $id, \OneLogin\api\userParams $userParams) : \OneLogin\api\Updated
see | Update User by ID documentation |
---|
\OneLogin\api\id
Id of the user to be modified
\OneLogin\api\userParams
User 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\Updated
UserextractErrorMessageFromResponse($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"