protected void doLogin ( LoginCredential credential , LoginSpecifiedOption option ) throws LoginFailureException { handleLoginSuccess ( findLoginUser ( credential ) . orElseThrow ( ( ) -> { final String msg = "Not found the user by the credential: " + credential + ", " + option ; return handleLoginFailure ( msg , credential , OptionalThing . of ( option ) ) ; } ) , option ) ; }
Do actually login for the user by credential .