class PasswordCodeAuthenticationConverter extends BaseAuthenticationConverter {
    private final static String PARAM_DEVICEID = "deviceId";
    private final static String PARAM_VALIDCODE = "validCode";
    @Override
    protected String supportGrantType() {
        return PasswordCodeAuthenticationToken.GRANT_TYPE.getValue();
    }

    @Override
    protected List<String> paramNames() {
        return List.of(OAuth2ParameterNames.USERNAME, OAuth2ParameterNames.PASSWORD
                , PARAM_DEVICEID, PARAM_VALIDCODE);
    }

    @Override
    protected BaseAuthenticationToken getToken(MultiValueMap<String, String> parameters) {<FILL_FUNCTION_BODY>}
}

        String username = OAuthEndpointUtils.getParam(parameters, OAuth2ParameterNames.USERNAME);
        String password = OAuthEndpointUtils.getParam(parameters, OAuth2ParameterNames.PASSWORD);
        String deviceId = OAuthEndpointUtils.getParam(parameters, PARAM_DEVICEID);
        String validCode = OAuthEndpointUtils.getParam(parameters, PARAM_VALIDCODE);
        return new PasswordCodeAuthenticationToken(username, password, deviceId, validCode);
    
<methods>public non-sealed void <init>() ,public org.springframework.security.core.Authentication convert(jakarta.servlet.http.HttpServletRequest) ,public Map<java.lang.String,java.lang.Object> getAdditionalParameters(MultiValueMap<java.lang.String,java.lang.String>, List<java.lang.String>) ,public org.springframework.security.core.Authentication getAuthentication(MultiValueMap<java.lang.String,java.lang.String>) ,public Set<java.lang.String> getRequestScopes(MultiValueMap<java.lang.String,java.lang.String>) <variables>