This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --env-filter ' | |
WRONG_EMAIL="WRONG_EMAIL" | |
NEW_NAME="NEW_NAME" | |
NEW_EMAIL="NEW_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$NEW_NAME" | |
export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Module for the rainbow generation. | |
""" | |
from math import floor | |
import csv | |
def h(x: int) -> int: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EnableWebSecurity | |
public class WebSecurity extends WebSecurityConfigurerAdapter { | |
private UserDetailsServiceImpl userDetailsService; | |
private BCryptPasswordEncoder bCryptPasswordEncoder; | |
public WebSecurity(UserDetailsServiceImpl userService, BCryptPasswordEncoder bCryptPasswordEncoder) { | |
this.userDetailsService = userService; | |
this.bCryptPasswordEncoder = bCryptPasswordEncoder; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SecurityConstants { | |
public static final String SECRET = "SECRET_KEY"; | |
public static final long EXPIRATION_TIME = 900_000; // 15 mins | |
public static final String TOKEN_PREFIX = "Bearer "; | |
public static final String HEADER_STRING = "Authorization"; | |
public static final String SIGN_UP_URL = "/api/services/controller/user"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JWTAuthenticationFilter extends UsernamePasswordAuthenticationFilter { | |
private AuthenticationManager authenticationManager; | |
public JWTAuthenticationFilter(AuthenticationManager authenticationManager) { | |
this.authenticationManager = authenticationManager; | |
setFilterProcessesUrl("/api/services/controller/user/login"); | |
} |