QUESTION #1

func Authenticate(w http.ResponseWriter, r *http.Request) {
        // Your code
}

Which uAdmin function will match the given statement above?

A. uadmin.IsAuthenticated(w)
B. uadmin.IsAuthenticated(r)
C. uadmin.IsAuthenticated(&w)
D. uadmin.IsAuthenticated(&r)


QUESTION #2

Which uAdmin function will be used to get the session key?

A. uadmin.IsAuthenticated(r)
B. uadmin.IsAuthenticated(&r)
C. uadmin.IsAuthenticated(w)
D. uadmin.IsAuthenticated(&w)


QUESTION #3

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the user in the session?

A. session.Get(User)
B. session.User
C. session = User
D. session(User)


QUESTION #4

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the login time in the session?

A. session = LoginTime
B. session(LoginTime)
C. session.Get(LoginTime)
D. session.LoginTime


QUESTION #5

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the active status in the session?

A. session.Get(Active)
B. session = Active
C. session.Active
D. session(Active)


QUESTION #6

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the expiration date in the session?

A. session.ExpiresOn
B. session.ExpirationDate
C. session.Expiration
D. session.ExpireDate


QUESTION #7

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the username of the user in the session?

A. session.User
B. session.Username
C. session.User.Name
D. session.User.Username


QUESTION #8

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the surname of the user in the session?

A. session.User.Surname
B. session.Surname
C. session.User.LastName
D. session.LastName


QUESTION #9

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the active status of the user in the session?

A. session.Active
B. session.User.Active
C. session.UserActive
D. session.User.UserActive


QUESTION #10

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to get the last login of the user in the session?

A. session.LastLogin
B. session.User.Lastlogin
C. session.Lastlogin
D. session.User.LastLogin


QUESTION #11

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to logout the session?

A. session.Logout()
B. session.Logout(w)
C. session.Logout(r)
D. session.LogOut()


QUESTION #12

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to check if the user is authenticated or not?

A. if session == "" {
                LoginHandler(w, r)
                return
        }


B. if session == 0 {
                LoginHandler(w, r)
                return
        }


C. if session == nil {
                LoginHandler(w, r)
                return
        }


D. if session == uadmin.IsAuthenticated() {
                LoginHandler(w, r)
                return
        }



QUESTION #13

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to check if the session and user are active?

A. if session.Active <> session.User.Active {
                fmt.Println("The session and user is active.")
        } else {
                fmt.Println("Either the session or the user is inactive.")
        }


B. if session.Active && session.User.Active {
                fmt.Println("The session and user is active.")
        } else {
                fmt.Println("Either the session or the user is inactive.")
        }


C. if session.Active || session.User.Active {
                fmt.Println("The session and user is active.")
        } else {
                fmt.Println("Either the session or the user is inactive.")
        }


D. if session.Active != session.User.Active {
                fmt.Println("The session and user is active.")
        } else {
                fmt.Println("Either the session or the user is inactive.")
        }



QUESTION #14

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to check if either the pending OTP is enabled in the session or OTP Required is enabled in the user?

A. if session.PendingOTP || session.User.OTPRequired {
                fmt.Println("This session has either pending OTP in the session or OTP is enabled in the user.")
        } else {
                fmt.Println("This session has no pending OTP in the session and OTP is disabled in the user.")
        }


B. if session.PendingOTP && session.User.OTPRequired {
                fmt.Println("This session has either pending OTP in the session or OTP is enabled in the user.")
        } else {
                fmt.Println("This session has no pending OTP in the session and OTP is disabled in the user.")
        }


C. if session.User.PendingOTP || session.OTPRequired {
                fmt.Println("This session has either pending OTP in the session or OTP is enabled in the user.")
        } else {
                fmt.Println("This session has no pending OTP in the session and OTP is disabled in the user.")
        }


D. if session.User.PendingOTP && session.OTPRequired {
                fmt.Println("This session has either pending OTP in the session or OTP is enabled in the user.")
        } else {
                fmt.Println("This session has no pending OTP in the session and OTP is disabled in the user.")
        }



QUESTION #15

Suppose that session is a variable that assigns the IsAuthenticated function.

Which declaration will be used to check if the session and user last login are similar?

A. if session.LastLogin && session.User.LastLogin {
                fmt.Println("Session last login and user last login are similar.")
        } else {
                fmt.Println("Session last login and user last login are different.")
        }


B. if session.LastLogin == session.User.LastLogin {
                fmt.Println("Session last login and user last login are similar.")
        } else {
                fmt.Println("Session last login and user last login are different.")
        }


C. if session.LastLogin.String() && session.User.LastLogin.String() {
                fmt.Println("Session last login and user last login are similar.")
        } else {
                fmt.Println("Session last login and user last login are different.")
        }


D. if session.LastLogin.String() == session.User.LastLogin.String() {
                fmt.Println("Session last login and user last login are similar.")
        } else {
                fmt.Println("Session last login and user last login are different.")
        }