Skip to content

Commit

Permalink
Merge pull request #36 from wwan13/feature/refactor
Browse files Browse the repository at this point in the history
Feature/refactor
  • Loading branch information
wwan13 authored Jun 25, 2024
2 parents 4681f1e + a06679b commit 927e579
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import io.wwan13.wintersecurity.secretkey.SecretKey;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

public class AuthConfiguration {
Expand Down Expand Up @@ -64,6 +63,6 @@ public AbstractInterceptorAuthProcessor authProcessor(

@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
return new io.wwan13.wintersecurity.passwordencoder.PasswordEncoder();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import io.wwan13.wintersecurity.jwt.provider.JwtTokenDecoder;
import io.wwan13.wintersecurity.jwt.provider.JwtTokenGenerator;
import io.wwan13.wintersecurity.secretkey.SecretKey;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

public class JwtConfiguration {
Expand All @@ -43,6 +44,7 @@ public TokenGenerator tokenGenerator(
}

@Bean
@ConditionalOnMissingBean(TokenDecoder.class)
public TokenDecoder tokenDecoder(SecretKey secretKey) {
return new JwtTokenDecoder(secretKey);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2024 the original author or authors.
*
* 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.
*/

package io.wwan13.wintersecurity.passwordencoder;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class PasswordEncoder extends BCryptPasswordEncoder {
}

0 comments on commit 927e579

Please sign in to comment.