All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ibole.infrastructure.security.jwt.BaseTokenAuthenticator Maven / Gradle / Ivy

The newest version!
package com.github.ibole.infrastructure.security.jwt;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.github.ibole.infrastructure.cache.redis.RedisSimpleTempalte;

/*********************************************************************************************
 * .
 * 
 * 
 * 

* Copyright 2016, iBole Inc. All rights reserved. * *

*

* *********************************************************************************************/ /** * Base class for simple JWT authenticators. * * Create a token would be to authenticate the user via their login credentials, * and if successful return a token corresponding to that user * * @author bwang ([email protected]) * * @param * @param */ public class BaseTokenAuthenticator implements TokenAuthenticator { protected Logger logger = LoggerFactory.getLogger(this.getClass()); protected RedisSimpleTempalte redisTemplate; public BaseTokenAuthenticator(RedisSimpleTempalte redisTemplate) { this.redisTemplate = redisTemplate; } @Override public String createAccessToken(JwtObject claim, S sender, R receiver) throws TokenParseException { throw new UnsupportedOperationException(); } @Override public TokenStatus validAccessToken(String token, String clientId, String loginId, S sender, R receiver) { throw new UnsupportedOperationException(); } @Override public String createRefreshToken(JwtObject claim, S sender, R receiver) throws TokenParseException{ throw new UnsupportedOperationException(); } @Override public boolean validRefreshToken(String token, String clientId, String loginId, S sender, R receiver) { throw new UnsupportedOperationException(); } @Override public String renewToken(String token, int ttlSeconds, boolean refreshToken, S sender, R receiver) throws TokenParseException { throw new UnsupportedOperationException(); } /** * @return the redisTemplate */ public RedisSimpleTempalte getRedisTemplate() { return redisTemplate; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy