File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
server/src/test/java/dev/findfirst/security/oauth2 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ class Oauth2LoginSuccessHandlerTest {
6161 @ DisplayName ("Authenticate active Github user" )
6262 void authenticateGithubUser () throws Exception {
6363 oAuthHandler .setRedirectURL ("localhost" );
64- authenticateUserByProvider ("github" );
64+ authenticateUserByProvider ();
6565 }
6666
67- private void authenticateUserByProvider (String provider ) throws Exception {
68- OAuth2AuthenticationToken oAuthToken = mockAuthentication (provider . toLowerCase () ).getFirst ();
67+ private void authenticateUserByProvider () throws Exception {
68+ OAuth2AuthenticationToken oAuthToken = mockAuthentication ().getFirst ();
6969
7070 MockHttpServletResponse response = new MockHttpServletResponse ();
7171 oAuthHandler .onAuthenticationSuccess (new MockHttpServletRequest (), response , oAuthToken );
@@ -74,7 +74,7 @@ private void authenticateUserByProvider(String provider) throws Exception {
7474 assertEquals ("localhost/account/login/oauth2" , response .getRedirectedUrl ());
7575 }
7676
77- private Entry <OAuth2AuthenticationToken , OAuth2User > mockAuthentication (String provider ) {
77+ private Entry <OAuth2AuthenticationToken , OAuth2User > mockAuthentication () {
7878 OAuth2AuthenticationToken oauthToken = mock (OAuth2AuthenticationToken .class );
7979 OAuth2User principal = mock (OAuth2User .class );
8080 Map <String , Object > attributes = new HashMap <>();
You can’t perform that action at this time.
0 commit comments