// Path: src/main/java/org/auslides/security/mapper/TokenMapper.java
// public interface TokenMapper {
// 
//     final String getAll = "SELECT * FROM T_TOKEN";
//     final String getById = "SELECT * FROM T_TOKEN WHERE ID = #{id}";
//     final String getByToken = "SELECT * FROM T_TOKEN WHERE token = #{token}";
//     final String deleteByToken = "DELETE from T_TOKEN WHERE token = #{token}";
//     final String deleteAll = "DELETE from T_TOKEN WHERE";
//     final String insert = "INSERT INTO T_TOKEN (email, token) VALUES (#{email}, #{token})";
//     final String updateToken = "UPDATE T_TOKEN SET token = #{token} WHERE token = #{token}";
// 
//     @Select(getAll)
//     @Results(value = {
//             @Result(property = "id", column = "ID"),
//             @Result(property = "email", column = "email"),
//             @Result(property = "token", column = "token")
//     })
//     List<DBAuthenticationToken> getAll();
// 
//     @Select(getById)
//     @Results(value = {
//             @Result(property = "id", column = "ID"),
//             @Result(property = "email", column = "email"),
//             @Result(property = "token", column = "token")
//     })
//     DBAuthenticationToken getById(int id);
// 
//     @Select(getByToken)
//     @Results(value = {
//             @Result(property = "id", column = "ID"),
//             @Result(property = "email", column = "email"),
//             @Result(property = "token", column = "token")
//     })
//     DBAuthenticationToken getByToken(String token);
// 
//     @Update(updateToken)
//     void updateToken(String token);
// 
//     @Delete(deleteByToken)
//     void deleteByToken(String token);
// 
//     @Delete(deleteAll)
//     void deleteAll();
// 
//     @Insert(insert)
//     @Options(useGeneratedKeys = true, keyProperty = "id")
//     void insert(DBAuthenticationToken dbAuthenticationToken) ;
// }
// 
// Path: src/main/java/org/auslides/security/model/DBAuthenticationToken.java
// public class DBAuthenticationToken {
// 
// 	static final Logger LOGGER = Logger.getLogger(DBAuthenticationToken.class.getName());
// 	private int id;
// 	private String email; // not a Ref<DBMember> to support super-admins
// 	private String token;
// 
// 	protected DBAuthenticationToken() {}
// 
// 	public DBAuthenticationToken(String email, String token) {
// 		this.email = email;
// 		this.token = token;
// 	}
// 
// 	public int getId() {
// 		return id;
// 	}
// 
// 	public void setId(int id) {
// 		this.id = id;
// 	}
// 
// 	public String getEmail() {
// 		return email;
// 	}
// 
// 	public void setEmail(String email) {
// 		this.email = email;
// 	}
// 
// 	public String getToken() {
// 		return token;
// 	}
// 
// 	public void setToken(String token) {
// 		this.token = token;
// 	}
// }


import org.auslides.security.mapper.TokenMapper;
import org.auslides.security.model.DBAuthenticationToken;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
package org.auslides.security.repository;



public class TokenRepositoryImpl implements TokenRepository {

    private static final Logger LOGGER = LoggerFactory.getLogger(TokenRepositoryImpl.class.getName());

    @Autowired
// Path: src/main/java/org/auslides/security/mapper/TokenMapper.java
// public interface TokenMapper {
// 
//     final String getAll = "SELECT * FROM T_TOKEN";
//     final String getById = "SELECT * FROM T_TOKEN WHERE ID = #{id}";
//     final String getByToken = "SELECT * FROM T_TOKEN WHERE token = #{token}";
//     final String deleteByToken = "DELETE from T_TOKEN WHERE token = #{token}";
//     final String deleteAll = "DELETE from T_TOKEN WHERE";
//     final String insert = "INSERT INTO T_TOKEN (email, token) VALUES (#{email}, #{token})";
//     final String updateToken = "UPDATE T_TOKEN SET token = #{token} WHERE token = #{token}";
// 
//     @Select(getAll)
//     @Results(value = {
//             @Result(property = "id", column = "ID"),
//             @Result(property = "email", column = "email"),
//             @Result(property = "token", column = "token")
//     })
//     List<DBAuthenticationToken> getAll();
// 
//     @Select(getById)
//     @Results(value = {
//             @Result(property = "id", column = "ID"),
//             @Result(property = "email", column = "email"),
//             @Result(property = "token", column = "token")
//     })
//     DBAuthenticationToken getById(int id);
// 
//     @Select(getByToken)
//     @Results(value = {
//             @Result(property = "id", column = "ID"),
//             @Result(property = "email", column = "email"),
//             @Result(property = "token", column = "token")
//     })
//     DBAuthenticationToken getByToken(String token);
// 
//     @Update(updateToken)
//     void updateToken(String token);
// 
//     @Delete(deleteByToken)
//     void deleteByToken(String token);
// 
//     @Delete(deleteAll)
//     void deleteAll();
// 
//     @Insert(insert)
//     @Options(useGeneratedKeys = true, keyProperty = "id")
//     void insert(DBAuthenticationToken dbAuthenticationToken) ;
// }
// 
// Path: src/main/java/org/auslides/security/model/DBAuthenticationToken.java
// public class DBAuthenticationToken {
// 
// 	static final Logger LOGGER = Logger.getLogger(DBAuthenticationToken.class.getName());
// 	private int id;
// 	private String email; // not a Ref<DBMember> to support super-admins
// 	private String token;
// 
// 	protected DBAuthenticationToken() {}
// 
// 	public DBAuthenticationToken(String email, String token) {
// 		this.email = email;
// 		this.token = token;
// 	}
// 
// 	public int getId() {
// 		return id;
// 	}
// 
// 	public void setId(int id) {
// 		this.id = id;
// 	}
// 
// 	public String getEmail() {
// 		return email;
// 	}
// 
// 	public void setEmail(String email) {
// 		this.email = email;
// 	}
// 
// 	public String getToken() {
// 		return token;
// 	}
// 
// 	public void setToken(String token) {
// 		this.token = token;
// 	}
// }


// Path: src/main/java/org/auslides/security/repository/TokenRepositoryImpl.java
import org.auslides.security.mapper.TokenMapper;
import org.auslides.security.model.DBAuthenticationToken;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

package org.auslides.security.repository;



public class TokenRepositoryImpl implements TokenRepository {

    private static final Logger LOGGER = LoggerFactory.getLogger(TokenRepositoryImpl.class.getName());

    @Autowired
    TokenMapper tokenMapper ;