public class KerberosUtil extends Object
Constructor and Description |
---|
KerberosUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultRealm() |
static String |
getKrb5LoginModuleName() |
static Oid |
getOidInstance(String oidName) |
static String |
getServicePrincipal(String service,
String hostname)
Create Kerberos principal for a given service and hostname.
|
public static String getKrb5LoginModuleName()
public static Oid getOidInstance(String oidName) throws ClassNotFoundException, GSSException, NoSuchFieldException, IllegalAccessException
public static String getDefaultRealm() throws ClassNotFoundException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
public static final String getServicePrincipal(String service, String hostname) throws UnknownHostException
service
- Service for which you want to generate the principal.hostname
- Fully-qualified domain name.UnknownHostException
- If no IP address for the local host could be found.Copyright © 2013 Apache Software Foundation. All rights reserved.