feat: Moved package name from cn.org.codecrafters to com.onixbyte

This commit is contained in:
Zihlu Wang
2024-04-26 01:50:46 +08:00
parent 65287d0b24
commit 8dd0dad8d9
66 changed files with 180 additions and 188 deletions
@@ -15,12 +15,12 @@
* limitations under the License.
*/
package cn.org.codecrafters.simplejwt.autoconfiguration;
package com.onixbyte.simplejwt.autoconfiguration;
import cn.org.codecrafters.guid.GuidCreator;
import cn.org.codecrafters.simplejwt.TokenResolver;
import cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver;
import cn.org.codecrafters.simplejwt.autoconfiguration.properties.SimpleJwtProperties;
import com.onixbyte.guid.GuidCreator;
import com.onixbyte.simplejwt.TokenResolver;
import com.onixbyte.simplejwt.authzero.AuthzeroTokenResolver;
import com.onixbyte.simplejwt.autoconfiguration.properties.SimpleJwtProperties;
import com.auth0.jwt.interfaces.DecodedJWT;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
@@ -15,14 +15,12 @@
* limitations under the License.
*/
package cn.org.codecrafters.simplejwt.autoconfiguration;
package com.onixbyte.simplejwt.autoconfiguration;
import cn.org.codecrafters.guid.GuidCreator;
import cn.org.codecrafters.simplejwt.autoconfiguration.conditions.GuidCreatorCondition;
import com.onixbyte.guid.GuidCreator;
import com.onixbyte.simplejwt.autoconfiguration.conditions.GuidCreatorCondition;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
@@ -15,12 +15,12 @@
* limitations under the License.
*/
package cn.org.codecrafters.simplejwt.autoconfiguration;
package com.onixbyte.simplejwt.autoconfiguration;
import cn.org.codecrafters.guid.GuidCreator;
import cn.org.codecrafters.simplejwt.TokenResolver;
import cn.org.codecrafters.simplejwt.autoconfiguration.properties.SimpleJwtProperties;
import cn.org.codecrafters.simplejwt.jjwt.JjwtTokenResolver;
import com.onixbyte.guid.GuidCreator;
import com.onixbyte.simplejwt.TokenResolver;
import com.onixbyte.simplejwt.autoconfiguration.properties.SimpleJwtProperties;
import com.onixbyte.simplejwt.jjwt.JjwtTokenResolver;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jws;
import lombok.extern.slf4j.Slf4j;
@@ -1,6 +1,6 @@
package cn.org.codecrafters.simplejwt.autoconfiguration.conditions;
package com.onixbyte.simplejwt.autoconfiguration.conditions;
import cn.org.codecrafters.guid.GuidCreator;
import com.onixbyte.guid.GuidCreator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
@@ -22,7 +22,7 @@ public class GuidCreatorCondition implements Condition {
* The condition to create bean {@code jtiCreator}.
* <p>
* If Spring does not have a bean of type
* {@link cn.org.codecrafters.guid.GuidCreator} named {@code jtiCreator}
* {@link GuidCreator} named {@code jtiCreator}
* in the application context, then create {@code jtiCreator}.
*
* @param context the spring application context
@@ -35,4 +35,4 @@
*
* @since 1.0.0
*/
package cn.org.codecrafters.simplejwt.autoconfiguration;
package com.onixbyte.simplejwt.autoconfiguration;
@@ -15,11 +15,12 @@
* limitations under the License.
*/
package cn.org.codecrafters.simplejwt.autoconfiguration.properties;
package com.onixbyte.simplejwt.autoconfiguration.properties;
import cn.org.codecrafters.simplejwt.SecretCreator;
import cn.org.codecrafters.simplejwt.autoconfiguration.AuthzeroTokenResolverAutoConfiguration;
import cn.org.codecrafters.simplejwt.constants.TokenAlgorithm;
import com.onixbyte.simplejwt.SecretCreator;
import com.onixbyte.simplejwt.autoconfiguration.AuthzeroTokenResolverAutoConfiguration;
import com.onixbyte.simplejwt.constants.TokenAlgorithm;
import com.onixbyte.simplejwt.jjwt.JjwtTokenResolver;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -32,7 +33,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* {@code SimpleJwtProperties} provides configuration options for the JWT
* algorithm, issuer, and secret. The properties are used by the {@link
* AuthzeroTokenResolverAutoConfiguration} and {@link
* cn.org.codecrafters.simplejwt.jjwt.JjwtTokenResolver} to set up the
* JjwtTokenResolver} to set up the
* necessary configurations for JWT generation and validation.
* <p>
* Developers can customise the JWT algorithm, issuer, and secret by setting
@@ -45,7 +46,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @since 1.0.0
*/
@Data
@ConfigurationProperties(prefix = "code-crafters.simple-jwt")
@ConfigurationProperties(prefix = "onixbyte.simple-jwt")
public class SimpleJwtProperties {
/**
@@ -27,9 +27,9 @@
* the corresponding properties in the application's properties file with the
* prefix "code-crafters.simple-jwt". The SimpleJwtAutoConfiguration class
* reads these properties and uses them to create the {@link
* cn.org.codecrafters.simplejwt.TokenResolver} bean with the desired
* com.onixbyte.simplejwt.TokenResolver} bean with the desired
* configuration.
*
* @since 1.0.0
*/
package cn.org.codecrafters.simplejwt.autoconfiguration.properties;
package com.onixbyte.simplejwt.autoconfiguration.properties;
@@ -1,3 +1,3 @@
cn.org.codecrafters.simplejwt.autoconfiguration.GuidAutoConfiguration
cn.org.codecrafters.simplejwt.autoconfiguration.AuthzeroTokenResolverAutoConfiguration
cn.org.codecrafters.simplejwt.autoconfiguration.JjwtTokenResolverAutoConfiguration
com.onixbyte.simplejwt.autoconfiguration.GuidAutoConfiguration
com.onixbyte.simplejwt.autoconfiguration.AuthzeroTokenResolverAutoConfiguration
com.onixbyte.simplejwt.autoconfiguration.JjwtTokenResolverAutoConfiguration