chore: removed lombok and upgraded copyright

This commit is contained in:
zihluwang
2025-01-25 19:53:04 +08:00
parent f771b1af19
commit 971037f160
48 changed files with 220 additions and 507 deletions
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,8 @@
package com.onixbyte.simplejwt;
import com.onixbyte.simplejwt.exceptions.WeakSecretException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Random;
@@ -32,6 +34,8 @@ import java.util.Random;
*/
public final class SecretCreator {
private final static Logger log = LoggerFactory.getLogger(SecretCreator.class);
/**
* Generates a secure secret with the specified length and character sets.
*
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
package com.onixbyte.simplejwt;
import java.util.Map;
/**
* {@code TokenPayload} interface is used to mark a data class as suitable
* for being used as the payload in a JSON Web Token (JWT). Any class
@@ -44,7 +42,4 @@ import java.util.Map;
* @since 1.0.0
*/
public interface TokenPayload {
// Marker interface for JWT payload data classes
}
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,27 +0,0 @@
/*
* Copyright (C) 2024-2024 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This package contains annotation classes that are used to prevent annotated
* properties from being automatically injected into the JSON Web Token (JWT)
* payload during token generation. These annotations can be applied to
* properties of a data class to exclude them from being included as part
* of the JWT payload.
*
* @since 1.0.0
*/
package com.onixbyte.simplejwt.annotations;
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
package com.onixbyte.simplejwt.constants;
import lombok.Getter;
import java.util.List;
/**
@@ -45,7 +43,6 @@ import java.util.List;
* @version 1.1.0
* @since 1.0.0
*/
@Getter
public enum TokenAlgorithm {
/**
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,14 +17,11 @@
package com.onixbyte.simplejwt.constants;
import lombok.Getter;
/**
* The base data types used to process enum data.
*
* @author Zihlu Wang
*/
@Getter
public enum TokenDataType {
/**
@@ -70,4 +67,12 @@ public enum TokenDataType {
this.mappedClass = mappedClass;
}
/**
* Return the target mapped class.
*
* @return mapped class
*/
public Class<?> getMappedClass() {
return mappedClass;
}
}
@@ -1,26 +0,0 @@
/*
* Copyright (C) 2024-2024 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This package contains constant values related to JSON Web Token (JWT)
* processing. These constants define various aspects of JWT, such as the
* algorithms being used for token signing and verification, and other
* configuration parameters.
*
* @since 1.0.0
*/
package com.onixbyte.simplejwt.constants;
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024-2024 OnixByte.
* Copyright (C) 2024-2025 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1,39 +0,0 @@
/*
* Copyright (C) 2024-2024 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The {@code cn.org.codecrafters.simplejwt.exceptions} package contains
* custom exception classes related to the
* {@code cn.org.codecrafters:simple-jwt-facade} library. These exceptions are
* thrown when there are issues or errors during the generation , validation,
* or processing of JSON Web Tokens (JWTs) in Java applications.
* <p>
* Custom exception classes in this package are designed to enhance the
* robustness and reliability of the JWT handling process by providing clear
* and meaningful error messages to the developers. They help developers
* identify and troubleshoot issues related to JWT generation, validation, or
* extraction and ensure smooth operation and error handling in
* their applications.
* <p>
* Developers using the {@code cn.org.codecrafters:simple-jwt-facade} library
* should be aware of the possible exceptions that can be thrown and handle
* them appropriately to ensure secure and reliable JWT handling in their
* Java applications.
*
* @since 1.0.0
*/
package com.onixbyte.simplejwt.exceptions;
@@ -1,40 +0,0 @@
/*
* Copyright (C) 2024-2024 OnixByte.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The {@code cn.org.codecrafters.simplejwt} package is the core package of the
* <b>Simple JWT</b> project, which provides a lightweight and easy-to-use
* library for working with JSON Web Tokens (JWTs) in Java applications. JWT is
* a widely-used standard for representing claims between two parties,
* typically used to secure web and mobile applications. This library aims to
* simplify the JWT handling process and provide convenient abstractions for
* JWT generation, validation, and extraction.
* <p>
* The <b>Simple JWT</b> library is designed to be flexible and customisable,
* allowing developers to use different algorithms, token resolvers, and token
* payload classes based on their specific application requirements. It aims to
* simplify the JWT handling process while maintaining security and best
* practices for working with JWTs.
* <p>
* Developers should refer to the official documentation and examples for the
* <b>Simple JWT</b> project to understand how to use the library effectively
* and securely in their Java applications.
*
*
* @since 1.0.0
*/
package com.onixbyte.simplejwt;