Package org.keycloak.example.kerberos
Class GSSCredentialsClient
- java.lang.Object
-
- org.keycloak.example.kerberos.GSSCredentialsClient
-
public class GSSCredentialsClient extends Object
Sample client able to authenticate against ApacheDS LDAP server with Krb5 GSS Credential. Credential was previously retrieved from SPNEGO authentication against Keycloak auth-server and transmitted from Keycloak to the application in OIDC access token We can use GSSCredential to further GSS API calls . Note that if you will use GSS API directly, you can attach GSSCredential when creating GSSContext like this: GSSContext context = gssManager.createContext(serviceName, KerberosSerializationUtils.KRB5_OID, deserializedGssCredential, GSSContext.DEFAULT_LIFETIME); In this example we authenticate against LDAP server, which calls GSS API under the hood when credential is attached to env under Sasl.CREDENTIALS key- Author:
- Marek Posolda
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGSSCredentialsClient.LDAPUser
-
Constructor Summary
Constructors Constructor Description GSSCredentialsClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GSSCredentialsClient.LDAPUsergetUserFromLDAP(javax.servlet.http.HttpServletRequest req)
-
-
-
Method Detail
-
getUserFromLDAP
public static GSSCredentialsClient.LDAPUser getUserFromLDAP(javax.servlet.http.HttpServletRequest req) throws Exception
- Throws:
Exception
-
-