com.github.ibole.infrastructure.security.jwt.jose4j.Jose4JJwtProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infrastructure-all Show documentation
Show all versions of infrastructure-all Show documentation
The all in one project of ibole infrastructure
The newest version!
package com.github.ibole.infrastructure.security.jwt.jose4j;
import org.jose4j.jwa.AlgorithmFactoryFactory;
import org.jose4j.jwk.EllipticCurveJsonWebKey;
import com.github.ibole.infrastructure.cache.redis.RedisSimpleTempalte;
import com.github.ibole.infrastructure.security.jwt.JwtProvider;
import com.github.ibole.infrastructure.security.jwt.TokenAuthenticator;
/*********************************************************************************************.
*
*
* Copyright 2016, iBole Inc. All rights reserved.
*
*
*********************************************************************************************/
/**
* @author bwang ([email protected])
*
*/
public class Jose4JJwtProvider extends JwtProvider {
/* (non-Javadoc)
* @see org.toprank.infrastructure.security.jwt.JwtProvider#isAvailable()
*/
@Override
protected boolean isAvailable() {
return true;
}
/* (non-Javadoc)
* @see org.toprank.infrastructure.security.jwt.JwtProvider#priority()
*/
@Override
protected int priority() {
return 5;
}
/* (non-Javadoc)
* @see org.toprank.infrastructure.security.jwt.JwtProvider#createTokenGenerator()
*/
@Override
public TokenAuthenticator createTokenGenerator(RedisSimpleTempalte redisTemplate) {
//Initialized jose4j
AlgorithmFactoryFactory.getInstance();
return new EcTokenAuthenticator(redisTemplate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy