aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/customurl/DGURLStreamHandler.java
blob: b5d0f8614d1dd868ea5c925b058333569c8a3aeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package kr.syeyoung.dungeonsguide.customurl;

import kr.syeyoung.dungeonsguide.Authenticator;
import lombok.AllArgsConstructor;

import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

@AllArgsConstructor
public class DGURLStreamHandler extends URLStreamHandler {
    private Authenticator authenticator;
    @Override
    protected URLConnection openConnection(URL url) throws IOException {
        return new DGURLConnection(url, authenticator);
    }
}