public synchronized Object put ( Object name , Object credentials ) { if ( credentials instanceof Principal ) return super . put ( name . toString ( ) , credentials ) ; if ( credentials instanceof Password ) return super . put ( name , new KnownUser ( name . toString ( ) , ( Password ) credentials ) ) ; if ( credentials != null ) return super . put ( name , new KnownUser ( name . toString ( ) , Credential . getCredential ( credentials . toString ( ) ) ) ) ; return null ; }
Put user into realm .