Created
September 4, 2018 17:25
-
-
Save adrianhall/7c582e34546ce805671c93e83deb52e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Record a successful authentication | |
* | |
* @param username the username of the user that was authenticated | |
*/ | |
override fun recordSuccessfulLogin(username: String) { | |
// Update the endpoint profile to include the username | |
val profile = pinpoint.targetingClient.currentEndpoint() | |
profile.user.userId = username | |
pinpoint.targetingClient.updateEndpointProfile(profile) | |
// Record the sign in | |
recordEvent("_userauth.sign_in") | |
} | |
/** | |
* Record a failed authentication | |
*/ | |
override fun recordFailedLogin() { | |
recordEvent("_userauth.authfail") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment