// Setup: Setup the Auth wrapper with the user to inspect info about the user
// NOTES:
// * 1. This component does NOT handle any actual login/logout/authorization features.
// * 2. This set of classes are only used to inspect information about a user.
// * 3. Since authorization is a fairly complex feature with implementations such as
// * OAuth, Social Auth, Slate Kit has purposely left out the Authentication to more reliable
// * libraries and frameworks.
// * 4. The SlateKit.Api component, while supporting basic api "Keys" based authentication,
// * and a roles based authentication, it leaves the login/logout and actual generating
// * of tokens to libraries such as OAuth.
val user2 = User( "2", "john doe", "john", "doe", "jdoe@gmail.com", "123-456-7890", false, false, true)
val auth = AuthConsole(isAuthenticated = true, user = user2, roles = "admin")
// CASE 1: Use the auth to check user info
println ("Checking auth info in desktop/local mode" )
println ( "user info : " + auth.user )
println ( "user id : " + auth.userId )
println ( "is authenticated : " + auth.isAuthenticated )
println ( "is email verified : " + auth.isEmailVerified )
println ( "is phone verified : " + auth.isPhoneVerified )
println ( "is a moderator : " + auth.isInRole( "moderator") )
println ( "is an admin : " + auth.isInRole( "admin" ) )