// Path: src/main/java/com/hoserdude/toboot/domain/User.java
// @Entity
// @Table(name = "tb_user", uniqueConstraints = {@UniqueConstraint(name = "UK_User_userId", columnNames = "userId")})
// public class User implements UserDetails {
// 
//     @Id
//     @GeneratedValue(strategy= GenerationType.AUTO)
//     private Long id;
// 
//     /**
//      * See unique constraint in Table definition
//      */
//     @Column
//     private String userId;
// 
//     @Column
//     private String fullName;
// 
//     @Column
//     private String email;
// 
//     public User() {}
// 
//     public User(String userId, String fullName, String email) {
//         this.userId = userId;
//         this.fullName = fullName;
//         this.email = email;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(String userId) {
//         this.userId = userId;
//     }
// 
//     public String getFullName() {
//         return fullName;
//     }
// 
//     public void setFullName(String fullName) {
//         this.fullName = fullName;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     // Everything down here is to be cool with Spring Security Interface we are implementing.
// 
//     @Override
//     public Collection<? extends GrantedAuthority> getAuthorities() {
//         return AuthorityUtils.createAuthorityList("ROLE_USER");
//     }
// 
//     /**
//      * Since we use OpenId, we never store this.
//      * @return
//      */
//     @Override
//     public String getPassword() {
//         return "";
//     }
// 
//     /**
//      * We're using the unique ID from OpenID
//      * @return
//      */
//     @Override
//     public String getUsername() {
//         return this.userId;
//     }
// 
//     @Override
//     public boolean isAccountNonExpired() {
//         return true;
//     }
// 
//     @Override
//     public boolean isAccountNonLocked() {
//         return true;
//     }
// 
//     @Override
//     public boolean isCredentialsNonExpired() {
//         return true;
//     }
// 
//     @Override
//     public boolean isEnabled() {
//         return true;
//     }
// 
// }


import com.hoserdude.toboot.domain.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
package com.hoserdude.toboot.web;



//No need to subclass anything, any class can be a controller.
@Controller
public class HomeController {

    private static Logger logger = LoggerFactory.getLogger(HomeController.class);
    /**
     * Names of the methods mean nothing, it's all about the RequestMapping defined above.
     * The RequestMapping is your Routing rule - all GET hits to the root of the context come here
     *
     * @param model where did this come from?  Automatically injected for your convenience.
     */
    @RequestMapping(value = "/home", method = RequestMethod.GET)
    public String home(Model model, Authentication authentication) {
// Path: src/main/java/com/hoserdude/toboot/domain/User.java
// @Entity
// @Table(name = "tb_user", uniqueConstraints = {@UniqueConstraint(name = "UK_User_userId", columnNames = "userId")})
// public class User implements UserDetails {
// 
//     @Id
//     @GeneratedValue(strategy= GenerationType.AUTO)
//     private Long id;
// 
//     /**
//      * See unique constraint in Table definition
//      */
//     @Column
//     private String userId;
// 
//     @Column
//     private String fullName;
// 
//     @Column
//     private String email;
// 
//     public User() {}
// 
//     public User(String userId, String fullName, String email) {
//         this.userId = userId;
//         this.fullName = fullName;
//         this.email = email;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(String userId) {
//         this.userId = userId;
//     }
// 
//     public String getFullName() {
//         return fullName;
//     }
// 
//     public void setFullName(String fullName) {
//         this.fullName = fullName;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public void setEmail(String email) {
//         this.email = email;
//     }
// 
//     // Everything down here is to be cool with Spring Security Interface we are implementing.
// 
//     @Override
//     public Collection<? extends GrantedAuthority> getAuthorities() {
//         return AuthorityUtils.createAuthorityList("ROLE_USER");
//     }
// 
//     /**
//      * Since we use OpenId, we never store this.
//      * @return
//      */
//     @Override
//     public String getPassword() {
//         return "";
//     }
// 
//     /**
//      * We're using the unique ID from OpenID
//      * @return
//      */
//     @Override
//     public String getUsername() {
//         return this.userId;
//     }
// 
//     @Override
//     public boolean isAccountNonExpired() {
//         return true;
//     }
// 
//     @Override
//     public boolean isAccountNonLocked() {
//         return true;
//     }
// 
//     @Override
//     public boolean isCredentialsNonExpired() {
//         return true;
//     }
// 
//     @Override
//     public boolean isEnabled() {
//         return true;
//     }
// 
// }


// Path: src/main/java/com/hoserdude/toboot/web/HomeController.java
import com.hoserdude.toboot.domain.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

package com.hoserdude.toboot.web;



//No need to subclass anything, any class can be a controller.
@Controller
public class HomeController {

    private static Logger logger = LoggerFactory.getLogger(HomeController.class);
    /**
     * Names of the methods mean nothing, it's all about the RequestMapping defined above.
     * The RequestMapping is your Routing rule - all GET hits to the root of the context come here
     *
     * @param model where did this come from?  Automatically injected for your convenience.
     */
    @RequestMapping(value = "/home", method = RequestMethod.GET)
    public String home(Model model, Authentication authentication) {
        User user = (User)authentication.getPrincipal();