input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void flush authentication cache string security domain cache policy cache get cache policy security domain if cache null cache flush else log warn failed to find cache policy for security domain security domain | flush the cache policy for the indicated security domain if one exists |
public void initialize subject subject callback handler callback handler map shared state map options this subject subject this callback handler callback handler this shared state shared state this options options log logger get logger get class log trace initialize check for password sharing options any non null value for password stacking sets use first pass as this module has no way to validate any shared password string password stacking string options get password stacking if password stacking null password stacking equals ignore case use first pass use first pass true | initialize the login module |
public string get server socket factory return server socket factory name | get the rmiserver socket factory implementation class |
public set get user roles principal principal hash set user roles null check that the caller is authenticated to the current thread subject subject get active subject if subject null copy the caller s roles synchronized domain cache domain info info get cache info principal false group roles null if info null roles info roles if roles null user roles new hash set enumeration members roles members while members has more elements principal role principal members next element user roles add role return user roles | return the set of domain roles the principal has been assigned |
public boolean login throws login exception log trace login login ok false if use first pass is true look for the shared password if use first pass true try object identity shared state get javax security auth login name object credential shared state get javax security auth login password if identity null credential null login ok true return true else fall through and perform the login catch exception e dump the exception and continue log error login failed e return false | looks for javax |
private properties load properties string properties name throws ioexception properties bundle null class loader loader thread current thread get context class loader url url loader get resource properties name if url null throw new ioexception properties file properties name not found super log trace properties file url input stream is url open stream if is null bundle new properties bundle load is else throw new ioexception properties file properties name not avilable return bundle | loads the given properties file and returns a properties object containing the |
public boolean abort throws login exception log trace abort return true | method to abort the authentication process phase 2 |
public void set app configuration entry app configuration entry login modules security manager sm system get security manager if sm null sm check permission set config entry perm this login modules login modules | set an application authentication configuration |
public void flush authentication cache string security domain principal user cache policy cache get cache policy security domain if cache null cache remove user else log warn failed to find cache policy for security domain security domain | flush a principals authentication cache entry associated with the |
public boolean logout throws login exception log trace logout remove the user identity principal identity get identity set principals subject get principals principals remove identity remove any added groups return true | remove the user identity and roles added to the subject during commit |
protected boolean does role group have role principal role group user roles first check that role is not a nobody principal if role instanceof nobody principal return false check for inclusion in the user s role set boolean is member user roles is member role if is member false check the anybody principal special cases is member role instanceof anybody principal return is member | check that the indicated application domain role is a member of the |
public url get config url return config get config url | set the url of the xml login configuration file that should |
protected group create group string name set principals group roles null iterator iter principals iterator while iter has next object next iter next if next instanceof group false continue group grp group next if grp get name equals name roles grp break if we did not find a group create one if roles null roles new nestable group name principals add roles return roles | find or create a group with the given name |
public void set config url url config url config set config url config url | set the url of the xml login configuration file that should |
public boolean get validate dtd return config get validate dtd | get whether the login config xml document is validated againsts its dtd |
public void set validate dtd boolean flag config set validate dtd flag | set whether the login config xml document is validated againsts its dtd |
public void verified user srpsession key key srpserver session session try synchronized cache policy we only insert a principal if there is no current entry if cache policy peek key null cache policy insert key session log trace cached srp session for user key else if overwrite sessions cache policy remove key cache policy insert key session log trace replaced srp session for user key else log debug ignoring srp session due to existing session for user key catch exception e log error failed to update srp cache for user key e | called when username has sucessfully completed the srp login |
public list get authentication cache principals string security domain cache policy cache get cache policy security domain list valid principals null if cache instanceof timed cache policy timed cache policy tcache timed cache policy cache valid principals tcache get valid keys return valid principals | return the active principals in the indicated security domain auth cache |
public void add app config string app name app configuration entry entries config add app config app name entries | add an application login configuration |
public configuration get configuration configuration prev config config set parent config prev config return config | get the xml based configuration given the configuration it should |
public url get config url return login config url | set the url of the xml login configuration file that should |
private object create secret key string cipher algorithm object key throws login exception object secret key null try secret key util create secret key cipher algorithm key catch exception e log error failed to create secret key e throw new login exception failed to create secret key return secret key | use reflection to create a javax |
public void set config url url login config url this login config url login config url | set the url of the xml login configuration file that should |
protected void start service throws exception config load config | load the configuration |
public string get security domain return this security domain | get the name of the security domain used for authentication |
public void set security domain string name this security domain name | set the name of the security domain used for authentication |
public class get callback handler class clazz null if callback handler null clazz callback handler get class return clazz | get the callback handler to use to obtain the authentication |
private void set field state entity enterprise context ctx field state field state jdbccontext jdbc ctx jdbccontext ctx get persistence context invalidate current field state field state current field state field state jdbc ctx get this if current field state null current field state invalidate if field state null jdbc ctx remove this else jdbc ctx put this field state | sets the field state object in the persistence context |
public void close string username throws security exception remote exception | close the srp session for the given username |
public void refresh document doc null try doc load url catch exception e e print stack trace return element root doc get document element node list apps root get elements by tag name application policy for int n 0 n apps get length n element app element apps item n string name app get attribute name app policy app policy new app policy name try parse app app policy if name equals default app policy name app policy set default app policy app policy else policy map put name app policy catch exception e e print stack trace | load reload the security policy |
public boolean get validate dtd return this validate dtd | get whether the login config xml document is validated againsts its dtd |
public void test remove member system out println test remove member for int g groups length 1 g 0 g test members g assert true remove groups g group remove member groups g | test of remove member method of class org |
public void test add member system out println test add member for int g 0 g groups length g group grp groups g group add member grp test members g try group add member new simple principal bad group fail was able to add a principal to nestable group catch illegal argument exception e | test of add member method of class org |
public void set validate dtd boolean flag this validate dtd flag | set whether the login config xml document is validated againsts its dtd |
private void test members int grp no string user user grp no hash set member set new hash set for int m 0 m 4 m principal p new simple principal user m assert true is member1 p group is member p member set add p enumeration members group members while members has more elements principal member principal members next element assert true is member2 member member set contains member | test of members method of class org |
public void add app config string app name app configuration entry entries security manager sm system get security manager if sm null sm check permission refresh perm authentication info auth info new authentication info auth info set app configuration entry entries app configs put app name auth info | add an application configuration |
public void test case4 throws exception login context lc new login context case4 try lc login fail login context login4 did not thrown an exception catch login exception e e print stack trace | this should fail because no login module succeeds |
private domain info get cache info principal principal boolean allow refresh if domain cache null return null domain info cache info null synchronized domain cache if allow refresh true cache info domain info domain cache get principal else cache info domain info domain cache peek principal return cache info | an accessor method that synchronizes access on the domain cache |
public void test remove member system out println test remove member for int p principals length 1 p 0 p assert true remove principals p principal remove member principals p test members | test of remove member method of class org |
public void test add member system out println test add member for int p 0 p principals length p principal user principals p principal add member user assert true add member user principal is member user test members | test of add member method of class org |
private void test members enumeration members principal members while members has more elements principal user principal members next element assert true members user principal is member user | test of members method of class org |
public void test shareverse interleave throws exception system out println test shareverse interleave message digest md message digest get instance sha srp reverse byte test session key get bytes byte hash1 util session key hash test string hash1b64 util encode base64 hash1 system out println hash1 hash1b64 byte hash2 md digest test string hash2b64 util encode base64 hash2 system out println hash2 hash2b64 super assert equals hash1b64 hash2b64 | this should match the util |
private void parse authorization element policy app policy app policy throws exception parse the permissions node list authorization policy get elements by tag name authorization if authorization get length 0 return element auth element authorization item 0 node list grants auth get elements by tag name grant for int n 0 n grants get length n element grant element grants item n parse grant grant app policy | parse the application policy authorization element |
protected void engine reset skip leading zeros true count 0 even bytes reset odd bytes reset sha reset | resets the digest for further use |
protected void engine update byte input if skip leading zeros true input 0 return skip leading zeros false if count 2 0 even bytes write input else odd bytes write input count | updates the digest using the specified byte |
protected void engine update byte input int offset int len for int i offset i offset len i engine update input i | updates the digest using the specified array of bytes |
protected string get users password return secret | this represents the true password |
protected string get users password message digest md null try md message digest get instance md5 catch exception e e print stack trace byte password bytes secret get bytes byte hash md digest password bytes string password hash util encode base64 hash return password hash | this represents the true password in its hashed form |
public void register security domain string security domain security domain instance log info added security domain instance to map cache policy auth cache lookup cache policy security domain security domain context sdc new security domain context instance auth cache security domain ctx map put security domain sdc see if the security mgr supports an externalized cache policy set security domain cache instance auth cache | register a security domain implmentation |
public void set object name object name object name this object name object name | setter for property object name |
public mbean info get meta data return meta data | getter for property meta data |
public void set meta data mbean info meta data this meta data meta data | setter for property meta data |
public int compare to object o mbean data md mbean data o string d1 object name get domain string d2 md object name get domain int compare d1 compare to d2 if compare 0 string p1 object name get canonical key property list string string p2 md object name get canonical key property list string compare p1 compare to p2 return compare | compares mbean data based on the object name domain name and canonical |
public void register plugin string console plugin class name throws exception class plugin class thread current thread get context class loader load class console plugin class name console plugin plugin console plugin plugin class new instance this register plugin plugin | send a message |
public void add tree model listener javax swing event tree model listener l tree model listeners add element l | adds a listener for the code tree model event code |
public object get child object parent int index node wrapper n node wrapper parent return n get child index | returns the child of code parent code at index code index code |
public int get child count object parent node wrapper n node wrapper parent return n get child count | returns the number of children of code parent code |
public int get index of child object parent object child node wrapper n node wrapper parent return n get index of child child | returns the index of child in parent |
public void set clean this dirty false | makrs the cmr field as clean |
public boolean is leaf object node node wrapper n node wrapper node return n is leaf | returns code true code if code node code is a leaf |
public void remove tree model listener javax swing event tree model listener l tree model listeners remove element l | removes a listener previously added with |
public void value for path changed javax swing tree tree path path object new value not used | messaged when the user has altered the value for the item identified |
public void init javax servlet servlet config config throws servlet exception super init config lookup the mbean server mbean server org elba mx util mbean server locator locate elba if mbean server null throw new servlet exception failed to locate the mbean server | initializes the servlet |
public string get servlet info return an http to jmx mbean server servlet | returns a short description of the servlet |
public list get value if is loaded throw new ejbexception cmr field value not loaded yet return collections unmodifiable list set handle 0 | get the current value list of primary keys |
public object invoke object obj method method object args throws throwable timed cache policy cache policy new timed cache policy default cache timeout true default cache resolution cache policy create cache policy start return cache policy | this is the invocation handler callback for the context interface that |
public long get last read return last read | when was this value last read from the datastore |
public void add relation object fk boolean modified false if is loaded modified set handle 0 add fk else modified removed relations remove fk added relations add fk if modified set dirty | add this foreign to the relationship |
public void remove relation object fk boolean modified false if is loaded modified set handle 0 remove fk else modified added relations remove fk removed relations add fk if modified set dirty | remove this foreign to the relationship |
public string to string string buffer b new string buffer b append name tag name b append class tag class name b append body body content b append info info string b append attributes n for int i 0 i attribute info length i b append t attribute info i to string b append n n return b to string | stringify for debug purposes |
public void load relations collection values check if we are aleready loaded if is loaded throw new ejbexception cmr field value is already loaded just in the case where there are lingering values set handle 0 clear add the new values set handle 0 add all values remove the already removed values set handle 0 remove all removed relations add the already added values but remove fks we are going to add to avoid duplication set handle 0 remove all added relations set handle 0 add all added relations mark the field loaded is loaded true | loads the collection of related ids |
public void invalidate make a new set handle and copy the current list to the new handle this will cause old references to the relation set to throw an illegal state exception if accesses but will not cause a reload in commit option a list current list null if set handle null set handle length 0 current list set handle 0 set handle 0 null set handle new list 1 set handle 0 current list relation set null | invalidate the current relationship set |
protected int scavenger period 60 30 1 2 an hour public int get scavenger period return scavenger period | the period between scavenges |
protected int scavenger extra time 60 30 1 2 an hour public int get scavenger extra time return scavenger extra time | the extra time we wait before tidying up a cmpstate to ensure |
protected int actual max inactive interval 60 60 24 28 28 days public int get actual max inactive interval return actual max inactive interval | a max inactive interval of 1 means never scavenge |
private void inspect mbean http servlet request request http servlet response response throws servlet exception ioexception string name urldecoder decode request get parameter name log trace inspect mbean name name try mbean data data server get mbean data name request set attribute mbean data data request dispatcher rd this get servlet context get request dispatcher inspect mbean jsp rd forward request response catch jmexception e throw new servlet exception failed to get mbean data e | display an mbeans attributes and operations |
public object clone service config copy new service config immutable so no reason to copy copy service name service name copy service config delegate class name service config delegate class name int length bindings null bindings length 0 copy bindings new service binding length for int b 0 b length b copy bindings b service binding bindings b clone return copy | make a deep copy of the service config bindings |
public void set bindings service binding bindings this bindings bindings | setter for property port |
public string get service config delegate class name return service config delegate class name | getter for property service config delegate class name |
public void set service config delegate class name string service config delegate class name this service config delegate class name service config delegate class name | setter for property service config delegate class name |
public object get service config delegate config return service config delegate config | getter for property service config delegate config |
public void set service config delegate config object service config delegate config this service config delegate config service config delegate config | setter for property service config delegate config |
public boolean equals object obj boolean equals false if obj instanceof service config service config sc service config obj equals this service name equals sc service name else equals super equals obj return equals | equality is based on the service name string |
public int hash code int hash code service name null 0 service name hash code return hash code | the hash code is based on the service name string hash code |
public void set store url url store url this store url store url | set the string representation of the store url |
private void init store throws exception log info initializing store if no store url identified use the server config url if this store url null this store url server config locator locate get server config url log info using store url store url class loader loader thread current thread get context class loader class factory class loader load class store factory class name services store factory store factory services store factory factory class new instance create and load the store store store factory new instance store load store url | create and load the services store |
public object clone object copy null try copy super clone catch clone not supported exception cant happend return copy | make a copy of the service binding |
public void set bind address inet address bind address this bind address bind address | sets the bind address attribute of the service descriptor object |
public inet address get bind address return this bind address | gets the bind address attribute of the service descriptor object |
public string to string string buffer s buf new string buffer service binding name string host get host name if host name null host any s buf append this get name s buf append host name s buf append host s buf append bind address s buf append this get bind address to string s buf append port s buf append this get port s buf append return s buf to string | create string representation of the service descriptor |
public services store new instance return new xmlservices store | load the contents of a store |
public service config get service string server name object name service name map server map map this servers get server name service config config null if server map null config service config server map get service name return config | looks up a service by server name and service name |
private string replace host and port string text string host string port string buffer replacement new string buffer text if host null host localhost simple looping should be replaced with regex package string test replacement to string int index while index test index of host 0 replacement replace index index 7 host test replacement to string while index test index of port 0 replacement replace index index 7 port test replacement to string return replacement to string | loop over text and replace any host and port strings |
private properties init xsl params xsl params new properties class loader cl thread current thread get context class loader path to standardelba xml url url cl get resource standardelba xml if url null xsl params set property standardelba new file url get file get absolute path else log debug standardelba xml not found path to standardelbacmp jdbc xml url cl get resource standardelbacmp jdbc xml if url null xsl params set property standardelbacmp jdbc new file url get file get absolute path else log debug standardelbacmp jdbc xml not found log debug initialized xsl parameters xsl params return xsl params | initializes xsl parameters |
public boolean accepts deployment info di delegate accepts to convertors iterator i converter list iterator while i has next convertor converter convertor i next if converter accepts di url return true return false | returns true if the there is a converter available to convert |
public boolean accepts url url delegate accepts to convertors iterator i converter list iterator while i has next convertor converter convertor i next if converter accepts url return true return false | returns true if the there is a converter available to convert |
protected void start service throws exception service controller service controller mbean mbean proxy ext create service controller mbean class service controller mbean object name server register with main deployer super start service | get a reference to the service controller |
public boolean accepts deployment info sdi string url str sdi url to string return url str to lower case ends with beanshell extension | returns true if this deployer can deploy the given deployment info |
public void remove convertor convertor converter converter list remove converter | removes a conveter from the list of converters |
public void set data source name string p data source name m data source name p data source name | sets the jndi name of the data source |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.