Skip to content

Commit

Permalink
Merge pull request #10 from chi2labs/sasha
Browse files Browse the repository at this point in the history
Sasha
  • Loading branch information
ppagnone authored Apr 14, 2020
2 parents 2e586fd + 4c8ec41 commit 1f6fb18
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 140 deletions.
1 change: 1 addition & 0 deletions R/cookie_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' * getCookie - Reactive function, returns the content of cookie if exist. Else return FALSE.
#' * setCookie - Sets the content for a cookie. (Required param: list())
#' * rmCookie - Removes a cookie
#' @md
#' @param input shiny input
#' @param output shiny output
#' @param session shiny session
Expand Down
10 changes: 5 additions & 5 deletions R/get_config.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' Get Cognito config from .yml
#'
#' Return all required configuration from file .yml to connect with Amazon Cognito instance.
# #' Get Cognito config from .yml
# #'
# #' Return all required configuration from file .yml to connect with Amazon Cognito instance.
#' @import config
#' @return list|FALSE
#' @author Pablo Pagnone
# #' @return list|FALSE
# #' @author Pablo Pagnone
get_config <- function() {

# Get configuration for Cognito Service.
Expand Down
12 changes: 6 additions & 6 deletions R/get_info_user.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' Get Cognito Information of user via oauth
#'
#' @param token string You can obtain with get_cognito_token_access()
#' @param cognito_config list List obtained with get_cognito_config()
# #' Get Cognito Information of user via oauth
# #'
# #' @param token string You can obtain with get_cognito_token_access()
# #' @param cognito_config list List obtained with get_cognito_config()
#' @import config
#' @import httr
#' @return list|FALSE - If request is success return list with info about user. If configuration of token is invalid return FALSE.
#' @author Pablo Pagnone
# #' @return list|FALSE - If request is success return list with info about user. If configuration of token is invalid return FALSE.
# #' @author Pablo Pagnone
get_info_user <- function(token, cognito_config) {

if(!is.list(cognito_config) || is.null(cognito_config$base_cognito_url)) {
Expand Down
16 changes: 8 additions & 8 deletions R/get_token_access.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#' Get Cognito Tokens via oauth
#'
#' With code received via url, get tokens for user via oauth.
#'
#' @param code character - Code Access received from Amazon Cognito
#' @param cognito_config list - List obtained with get_cognito_config()
# #' Get Cognito Tokens via oauth
# #'
# #' With code received via url, get tokens for user via oauth.
# #'
# #' @param code character - Code Access received from Amazon Cognito
# #' @param cognito_config list - List obtained with get_cognito_config()
#' @import config
#' @import httr
#' @return list|FALSE
#' @author Pablo Pagnone
# #' @return list|FALSE
# #' @author Pablo Pagnone
get_token_access <- function(code, cognito_config) {

if(!is.list(cognito_config) ||
Expand Down
16 changes: 8 additions & 8 deletions R/get_url_auth_redirect.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' Get Cognito URL for authentication redirect
#'
#' Return Url where user is redirect if is not logged yet.
#'
#' @param cognito_config list Obtained with get_cognito_config()
#' @param session Shiny session Will be used to keep the params in urls when redirection is done.
#' @return character|FALSE
#' @author Pablo Pagnone
# #' Get Cognito URL for authentication redirect
# #'
# #' Return Url where user is redirect if is not logged yet.
# #'
# #' @param cognito_config list Obtained with get_cognito_config()
# #' @param session Shiny session Will be used to keep the params in urls when redirection is done.
# #' @return character|FALSE
# #' @author Pablo Pagnone
get_url_auth_redirect <- function(cognito_config, session = getDefaultReactiveDomain()) {

if(!is.list(cognito_config) ||
Expand Down
14 changes: 7 additions & 7 deletions R/get_url_logout_redirect.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' Get Cognito URL for Logout redirect.
#'
#' Return Url where user is redirect when is logout.
#'
#' @param cognito_config list Obtained with get_cognito_config()
#' @return character|FALSE
#' @author Pablo Pagnone
# #' Get Cognito URL for Logout redirect.
# #'
# #' Return Url where user is redirect when is logout.
# #'
# #' @param cognito_config list Obtained with get_cognito_config()
# #' @return character|FALSE
# #' @author Pablo Pagnone
get_url_logout_redirect <- function(cognito_config) {

if(!is.list(cognito_config) ||
Expand Down
8 changes: 5 additions & 3 deletions man/cookie_server.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions man/get_config.Rd

This file was deleted.

22 changes: 0 additions & 22 deletions man/get_info_user.Rd

This file was deleted.

22 changes: 0 additions & 22 deletions man/get_token_access.Rd

This file was deleted.

22 changes: 0 additions & 22 deletions man/get_url_auth_redirect.Rd

This file was deleted.

20 changes: 0 additions & 20 deletions man/get_url_logout_redirect.Rd

This file was deleted.

0 comments on commit 1f6fb18

Please sign in to comment.