Class UserPrincipalNameSearchMapper
- java.lang.Object
- 
- net.sf.michaelo.tomcat.realm.mapper.UserPrincipalNameSearchMapper
 
- 
- All Implemented Interfaces:
- UsernameSearchMapper
 
 public class UserPrincipalNameSearchMapper extends Object implements UsernameSearchMapper A mapper for the AD attributeuserPrincipalName. This mapper maps the GSS name to the AD attributeuserPrincipalNamewhich by default contains the implicit UPN unless it's overwritten by the explicit (enterprise) UPN. In this case, the result will be empty. No assumption is made about the root DN set in the given context, so you can narrow down your search base if you like.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classUserPrincipalNameSearchMapper.UserPrincipalNameMappedValues- 
Nested classes/interfaces inherited from interface net.sf.michaelo.tomcat.realm.mapper.UsernameSearchMapperUsernameSearchMapper.MappedValues
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static OidKRB5_NT_ENTERPRISE_PRINCIPALprotected static OidKRB5_NT_PRINCIPALprotected static OidMS_UPN
 - 
Constructor SummaryConstructors Constructor Description UserPrincipalNameSearchMapper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Oid[]getSupportedStringNameTypes()Returns an array of name type OIDs which a mapper is able to map into AD search space.UsernameSearchMapper.MappedValuesmap(DirContext context, GSSName gssName)Maps a GSS name to AD search space parameters.booleansupportsGssName(GSSName gssName)Determines whether a mapper is able to map a given GSS name into AD search space.
 
- 
- 
- 
Method Detail- 
getSupportedStringNameTypespublic Oid[] getSupportedStringNameTypes() Description copied from interface:UsernameSearchMapperReturns an array of name type OIDs which a mapper is able to map into AD search space.- Specified by:
- getSupportedStringNameTypesin interface- UsernameSearchMapper
- Returns:
- supported string name type OIDs
 
 - 
supportsGssNamepublic boolean supportsGssName(GSSName gssName) Description copied from interface:UsernameSearchMapperDetermines whether a mapper is able to map a given GSS name into AD search space.- Specified by:
- supportsGssNamein interface- UsernameSearchMapper
- Parameters:
- gssName- the gssName to test
- Returns:
-  if this mapper is able to map a name, falseotherwise
 
 - 
mappublic UsernameSearchMapper.MappedValues map(DirContext context, GSSName gssName) throws NamingException Description copied from interface:UsernameSearchMapperMaps a GSS name to AD search space parameters. A mapper implementation must assure that the user can be found in the givencontextwhen an approriate GSS name is presented. The implementor must be aware that the returned search base might need to be relativized to the root DN of the context.- Specified by:
- mapin interface- UsernameSearchMapper
- Parameters:
- context- the search context
- gssName- the GSS name to be mapped
- Returns:
- mapped values for user retrieval
- Throws:
- NamingException- if a context-related error has occured
 
 
- 
 
-