| Type: | Package |
| Title: | Interact with the 'OneLogin' API |
| Version: | 0.2.0 |
| Description: | The identity provider ['OneLogin']http://onelogin.com is used for authentication via Single Sign On (SSO). This package provides an R interface to their API. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| LazyData: | true |
| Imports: | R6, glue, safer, magrittr, jsonlite, tibble |
| RoxygenNote: | 6.1.1 |
| NeedsCompilation: | no |
| Packaged: | 2019-08-07 13:46:13 UTC; alexkgold |
| Author: | Alex Gold [aut, cre], Cole Arendt [ctb] |
| Maintainer: | Alex Gold <alexkgold@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2019-08-07 14:00:02 UTC |
Pipe operator
Description
See magrittr::%>% for details.
Usage
lhs %>% rhs
Generate Invite Link
Description
Generate Invite Link
Usage
ol_invite_gen_link(con, email)
Arguments
con |
a 'OneLogin' connection |
email |
email of a user |
Value
data frame with email and invite link
Examples
if(interactive()) ol_invite_gen_link(onelogin(), "example@example.com")
Send Invite Links
Description
Send Invite Links
Usage
ol_invite_send_link(con, email)
Arguments
con |
a 'OneLogin' connection |
email |
email of a user |
Examples
if (interactive()) ol_invite_send_link(onelogin(), "example@example.com")
Get details of particular role
Description
Get details of particular role
Usage
ol_role_get_by_id(con, role_id)
Arguments
con |
a 'OneLogin' connection |
role_id |
the id of a role |
Value
a tibble of details on the role
Examples
if (interactive()) ol_role_get_by_id(onelogin(), 1234)
Get all available roles
Description
Get all available roles
Usage
ol_roles_get(con, ...)
Arguments
con |
a 'OneLogin' connection |
... |
filters for the roles. See options in the API docs. |
Value
a tibble of roles
Examples
if (interactive()) ol_roles_get(onelogin())
Generate a 'OneLogin' token
Description
Generate a 'OneLogin' token
Usage
ol_token_get(con)
Arguments
con |
a 'OneLogin' connection |
Value
A 'OneLogin' connection with auth token
Examples
if(interactive()) ol_token_get(onelogin())
Get 'OneLogin' API rate limit
Description
Get 'OneLogin' API rate limit
Usage
ol_token_get_rate_limit(con)
Arguments
con |
a 'OneLogin' connection |
Value
A tibble of rate limit data
Examples
if(interactive()) ol_token_get_rate_limit(onelogin())
Refresh 'OneLogin' auth token
Description
Refresh 'OneLogin' auth token
Usage
ol_token_refresh(con)
Arguments
con |
a 'OneLogin' connection |
Value
A 'OneLogin' connection with refreshed auth token
Examples
if(interactive()) ol_token_refresh(onelogin())
Revoke OneLogin access token
Description
Revoke OneLogin access token
Usage
ol_token_revoke(con)
Arguments
con |
a 'OneLogin' connection |
Value
A tibble of response status
Examples
#' if(interactive()) ol_token_revoke(onelogin())
Assign role to user
Description
Assign role to user
Usage
ol_user_assign_role(con, user_id, role_id_array)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
role_id_array |
numeric, one or more roles |
Examples
if (interactive()) ol_user_assign_role(onelogin(), 54963040, 268986)
Create a 'OneLogin' user.
Description
For a full listing of available fields, see the API documentation
Usage
ol_user_create(con, firstname, lastname, email, username, ...)
Arguments
con |
a 'OneLogin' connection |
firstname |
first name, character |
lastname |
last name, character |
email |
full email, character |
username |
username |
... |
other named parameters for the person |
Value
A tibble of user data
Examples
if (interactive()) ol_user_create(onelogin(), "Fake", "User",
"fake@user.com", "fake")
Delete user
Description
Delete user
Usage
ol_user_delete(con, user_id)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
Examples
if (interactive()) ol_user_delete(onelogin(), 54963040)
Get Apps for User
Description
Get Apps for User
Usage
ol_user_get_apps(con, user_id)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
Value
A tibble of user data (one row)
Examples
if (interactive()) ol_user_get_apps(onelogin(), 54400533)
Get a User by their ID
Description
Get a User by their ID
Usage
ol_user_get_by_id(con, user_id)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
Value
A tibble of user data (one row)
Examples
if (interactive()) ol_user_get_by_id(onelogin(), 54400533)
Get custom fields available for users
Description
Get custom fields available for users
Usage
ol_user_get_custom_fields(con)
Arguments
con |
a 'OneLogin' connection |
Value
A tibble of custom fields available
Examples
if (interactive()) ol_user_get_custom_fields(onelogin())
Get Roles for a User
Description
Get Roles for a User
Usage
ol_user_get_roles(con, user_id)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
Value
A data frame of the user id and role
Examples
if (interactive()) ol_user_get_roles(onelogin(), 54400533)
Lock user
Description
Lock user
Usage
ol_user_lock_account(con, user_id, locked_until = 0)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
locked_until |
numeric, number of minutes, default to 0 see API documentation for more details |
Examples
if (interactive()) ol_user_lock_account(onelogin(), 54963040)
Log user out
Description
Log user out
Usage
ol_user_log_out(con, user_id)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
Examples
if (interactive()) ol_user_log_out(onelogin(), 54963040)
Set or change user's password
Description
Set or change user's password
Usage
ol_user_pwd_cleartext(con, user_id, password, password_confirmation,
validate_policy = FALSE)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
password |
character, new password |
password_confirmation |
character, new password |
validate_policy |
utilize password policy checks? defaults to FALSE |
Examples
if (interactive()) ol_user_pwd_cleartext(onelogin(), 54963040, "pwd", "pwd")
Set or changes user's password after encryption
Description
See the API docs for details on how to encrypt the password.
Usage
ol_user_pwd_sha256_salt(con, user_id, password, password_confirmation,
password_algorithm = "salt+sha256", password_salt = "")
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
password |
character, new password |
password_confirmation |
character, new password |
password_algorithm |
algorithm, defaults to "salt+sha256" |
password_salt |
defaults to "" |
Examples
if (interactive()) ol_user_pwd_sha256_salt(onelogin(), 54963040,
safer::encrypt_string("saltpwd"), safer::encrypt_string("saltpwd"),
password_salt = "salt")
Remove role from user
Description
Remove role from user
Usage
ol_user_remove_role(con, user_id, role_id_array)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
role_id_array |
numeric, one or more roles |
Examples
if (interactive()) ol_user_remove_role(onelogin(), 54963040, 268986)
Set custom attribute for users
Description
See ol_user_get_custom_fields to get custom fields
Usage
ol_user_set_custom_attr(con, user_id, ...)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
... |
named custom attributes to set |
Examples
if (interactive()) ol_user_set_custom_attr(onelogin, 54963040, attr = "value")
Set user state
Description
Set user state
Usage
ol_user_set_state(con, user_id, state)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
state |
numeric, 0-3, see documentation for value meanings |
Examples
if (interactive()) ol_user_set_state(onelogin(), 54963040, 1)
Update user information by ID
Description
Update user information by ID
Usage
ol_user_update(con, user_id, ...)
Arguments
con |
a 'OneLogin' connection |
user_id |
user id |
... |
named parameters to change in request |
Value
A tibble of user data
Examples
if (interactive()) ol_user_update(onelogin(), 54963040, firstname = "Fake1")
Get Users from OneLogin
Description
You can filter the user by various parameters in onelogin. See the page in the API docs for filter options.
Usage
ol_users_get(con, ...)
Arguments
con |
a 'OneLogin' connection |
... |
filter parameters, optional; see API documentation |
Details
The id column in the returned tibble is the user_id for any of the user functions that are by id.
Value
A tibble of users and their attributes
Examples
if (interactive()) ol_users_get(onelogin())
if (interactive()) ol_users_get(onelogin(), firstname = "name")
Define a 'OneLogin' Connection
Description
Define a connection to the 'OneLogin' API. Please see the API documentation for details on using this API and on getting credentials.
Usage
onelogin(region = "US", client_id = Sys.getenv("ONELOGIN_CLIENT_ID"),
client_secret = Sys.getenv("ONELOGIN_CLIENT_SECRET"))
Arguments
region |
either "US" or "EU", defaults to "US" |
client_id |
'OneLogin' client ID, defaults to Sys.getenv("ONELOGIN_CLIENT_ID") |
client_secret |
'OneLogin' client secret, defaults to Sys.getenv("ONELOGIN_CLIENT_SECRET") |
Value
A 'OneLogin' connection
Examples
if (interactive()) onelogin(region = "US")