|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 차의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjava.net.Authenticator
public abstract class Authenticator
Authenticator 클래스는, 네트워크 접속에 필요한 인증을 취득하기 위한 객체를 나타냅니다. 일반적으로은, 사용자에게 정보의 입력을 요구하는 것으로, 인증을 실시합니다.
어플리케이션은, 서브 클래스에서 getPasswordAuthentication()
를 오버라이드(override) 하는 것으로 이 클래스를 사용합니다. 이 메소드는, 일반적으로, 다양한 getXXX() 액세스용 메소드를 사용해, 인증을 요구하고 있는 엔티티에 관한 정보를 가져옵니다. 다음에, 사용자와의 대화, 또는 그 외의 대화 이외 방법으로, 사용자명과 패스워드를 취득할 필요가 있습니다. 그 후,PasswordAuthentication
의 반환값으로서 자격이 돌려주어집니다.
다음에,setDefault(Authenticator)
를 호출하는 것으로, 이 구상 서브 클래스의 인스턴스가 시스템에 등록됩니다. 인증이 필요한 경우, 시스템은 requestPasswordAuthentication() 메소드의 1 개를 호출해, 이것이 등록된 객체의 getPasswordAuthentication() 메소드를 호출합니다.
인증을 요구하는 메소드는 모두, 실패에 끝나는 디폴트 구현을 가지고 있습니다.
setDefault(java.net.Authenticator)
,
getPasswordAuthentication()
상자의 클래스의 개요 | |
---|---|
static class |
Authenticator.RequestorType
인증을 요구하고 있는 엔티티의 타입. |
생성자 의 개요 | |
---|---|
Authenticator ()
|
메소드의 개요 | |
---|---|
protected PasswordAuthentication |
getPasswordAuthentication ()
패스워드 인증이 필요한 경우에 불려 갑니다. |
protected String |
getRequestingHost ()
인증을 요구하고 있는 사이트 또는 프록시의 hostname 를 가져옵니다. |
protected int |
getRequestingPort ()
요구된 접속에 사용하는 포트 번호를 가져옵니다. |
protected String |
getRequestingPrompt ()
요구자가 입력한 prompt 캐릭터 라인을 가져옵니다. |
protected String |
getRequestingProtocol ()
접속을 요구하고 있는 프로토콜을 돌려줍니다. |
protected String |
getRequestingScheme ()
요구자가 사용하고 있는 방식 (예를 들어, HTTP 방화벽(fire wall)의 경우는 HTTP 방식) |
protected InetAddress |
getRequestingSite ()
허가를 요구하고 있는 사이트의 InetAddress 를 가져옵니다. |
protected URL |
getRequestingURL ()
이 인증 요구의 결과인 URL 를 돌려줍니다. |
protected Authenticator.RequestorType |
getRequestorType ()
요구자가 프록시인가 서버인지를 돌려줍니다. |
static PasswordAuthentication |
requestPasswordAuthentication (InetAddress addr,
int port,
String protocol,
String prompt,
String scheme)
시스템에 등록되어 있는 Authenticator에, 패스워드를 요구합니다. |
static PasswordAuthentication |
requestPasswordAuthentication (String host,
InetAddress addr,
int port,
String protocol,
String prompt,
String scheme)
시스템에 등록되어 있는 Authenticator에, 패스워드를 요구합니다. |
static PasswordAuthentication |
requestPasswordAuthentication (String host,
InetAddress addr,
int port,
String protocol,
String prompt,
String scheme,
URL url,
Authenticator.RequestorType reqType)
시스템에 등록되어 있는 Authenticator에, 패스워드를 요구합니다. |
static void |
setDefault (Authenticator a)
Authenticator를 설정합니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public Authenticator()
메소드의 상세 |
---|
public static void setDefault(Authenticator a)
시큐리티 매니저가 존재하는 경우, 최초로 시큐리티 매니저의 checkPermission
메소드가, 액세스권 NetPermission("setDefaultAuthenticator")
를 지정해 불려 갑니다. 이 결과, java.lang.SecurityException 가 되는 일이 있습니다.
a
- 설정되는 Authenticator. a 가 null
의 경우, 이전으로 설정된 Authenticator는 삭제된다
SecurityException
- 시큐리티 매니저가 존재해, 그 checkPermission
메소드가 데포르트Authenticator의 설정을 허가하지 않는 경우SecurityManager.checkPermission(java.security.Permission)
,
NetPermission
public static PasswordAuthentication requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme)
시큐리티 매니저가 존재하는 경우, 최초로 시큐리티 매니저의 checkPermission
메소드가, 액세스권 NetPermission("requestPasswordAuthentication")
를 지정해 불려 갑니다. 이 결과, java.lang.SecurityException 가 되는 일이 있습니다.
addr
- 인증을 요구하고 있는 사이트의 InetAddress. InetAddress 가 불명의 경우는 nullport
- 요구된 접속에 사용하는 포트 번호protocol
- 접속을 요구하고 있는 프로토콜 (getRequestingProtocol()
)prompt
- 사용자에게 표시되는 prompt 캐릭터 라인scheme
- 인증 방식
SecurityException
- 시큐리티 매니저가 존재해, 그 checkPermission
메소드가 패스워드 인증 요구를 허가하지 않는 경우SecurityManager.checkPermission(java.security.Permission)
,
NetPermission
public static PasswordAuthentication requestPasswordAuthentication(String host, InetAddress addr, int port, String protocol, String prompt, String scheme)
시큐리티 매니저가 존재하는 경우, 최초로 시큐리티 매니저의 checkPermission
메소드가, 액세스권 NetPermission("requestPasswordAuthentication")
를 지정해 불려 갑니다. 이 결과, java.lang.SecurityException 가 되는 일이 있습니다.
host
- 인증을 요구하고 있는 사이트의 호스트명addr
- 인증을 요구하고 있는 사이트의 InetAddress. InetAddress 가 불명의 경우는 nullport
- 요구된 접속에 사용하는 포트 번호protocol
- 접속을 요구하고 있는 프로토콜 (getRequestingProtocol()
)prompt
- 인증 영역을 식별하는, 사용자에게 표시되는 prompt 캐릭터 라인scheme
- 인증 방식
SecurityException
- 시큐리티 매니저가 존재해, 그 checkPermission
메소드가 패스워드 인증 요구를 허가하지 않는 경우SecurityManager.checkPermission(java.security.Permission)
,
NetPermission
public static PasswordAuthentication requestPasswordAuthentication(String host, InetAddress addr, int port, String protocol, String prompt, String scheme, URL url, Authenticator.RequestorType reqType)
시큐리티 매니저가 존재하는 경우, 최초로 시큐리티 매니저의 checkPermission
메소드가, 액세스권 NetPermission("requestPasswordAuthentication")
를 지정해 불려 갑니다. 이 결과, java.lang.SecurityException 가 되는 일이 있습니다.
host
- 인증을 요구하고 있는 사이트의 호스트명addr
- 인증을 요구하고 있는 사이트의 InetAddress. InetAddress 가 불명의 경우는 nullport
- 요구된 접속에 사용하는 포트 번호protocol
- 접속을 요구하고 있는 프로토콜 (getRequestingProtocol()
)prompt
- 사용자에게 표시되는 prompt 캐릭터 라인scheme
- 인증 방식url
- 인증을 발생시킨 요구원의 URLreqType
- 인증을 요구하고 있는 엔티티의 타입 (서버 또는 프록시)
SecurityException
- 시큐리티 매니저가 존재해, 그 checkPermission
메소드가 패스워드 인증 요구를 허가하지 않는 경우SecurityManager.checkPermission(java.security.Permission)
,
NetPermission
protected final String getRequestingHost()
hostname
를 가져옵니다. hostname 를 사용할 수 없는 경우는 null
가 돌려주어집니다.
protected final InetAddress getRequestingSite()
InetAddress
를 가져옵니다. InetAddress 를 사용할 수 없는 경우는 null
가 돌려주어집니다.
protected final int getRequestingPort()
int
protected final String getRequestingProtocol()
URL.getProtocol()
protected final String getRequestingPrompt()
protected final String getRequestingScheme()
protected PasswordAuthentication getPasswordAuthentication()
protected URL getRequestingURL()
protected Authenticator.RequestorType getRequestorType()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 차의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.