org.apache.catalina.CredentialHandler Java Examples
The following examples show how to use
org.apache.catalina.CredentialHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RealmSF.java From Tomcat8-Source-Read with MIT License | 6 votes |
/** * Store the specified Realm properties and child (Realm) * * @param aWriter * PrintWriter to which we are storing * @param indent * Number of spaces to indent this element * @param aRealm * Realm whose properties are being stored * * @exception Exception * if an exception occurs while storing */ @Override public void storeChildren(PrintWriter aWriter, int indent, Object aRealm, StoreDescription parentDesc) throws Exception { if (aRealm instanceof CombinedRealm) { CombinedRealm combinedRealm = (CombinedRealm) aRealm; // Store nested <Realm> element Realm[] realms = combinedRealm.getNestedRealms(); storeElementArray(aWriter, indent, realms); } // Store nested <CredentialHandler> element CredentialHandler credentialHandler = ((Realm) aRealm).getCredentialHandler(); if (credentialHandler != null) { storeElement(aWriter, indent, credentialHandler); } }
Example #2
Source File: NestedCredentialHandler.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Override public boolean matches(String inputCredentials, String storedCredentials) { for (CredentialHandler handler : credentialHandlers) { if (handler.matches(inputCredentials, storedCredentials)) { return true; } } return false; }
Example #3
Source File: RealmBase.java From Tomcat8-Source-Read with MIT License | 5 votes |
protected boolean hasMessageDigest() { CredentialHandler ch = credentialHandler; if (ch instanceof MessageDigestCredentialHandler) { return ((MessageDigestCredentialHandler) ch).getAlgorithm() != null; } return false; }
Example #4
Source File: RealmBase.java From Tomcat8-Source-Read with MIT License | 5 votes |
private String getDigestEncoding() { CredentialHandler ch = credentialHandler; if (ch instanceof MessageDigestCredentialHandler) { return ((MessageDigestCredentialHandler) ch).getEncoding(); } return null; }
Example #5
Source File: LazyRealm.java From tomee with Apache License 2.0 | 5 votes |
@Override public void setCredentialHandler(final CredentialHandler credentialHandler) { this.credentialHandler = credentialHandler; final Class<?> r = loadClass(); if (r != null && instance() != null) { delegate.setCredentialHandler(credentialHandler); } }
Example #6
Source File: NestedCredentialHandler.java From Tomcat8-Source-Read with MIT License | 4 votes |
public void addCredentialHandler(CredentialHandler handler) { credentialHandlers.add(handler); }
Example #7
Source File: NestedCredentialHandler.java From Tomcat8-Source-Read with MIT License | 4 votes |
public CredentialHandler[] getCredentialHandlers() { return credentialHandlers.toArray(new CredentialHandler[0]); }
Example #8
Source File: RealmBase.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public CredentialHandler getCredentialHandler() { return credentialHandler; }
Example #9
Source File: RealmBase.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public void setCredentialHandler(CredentialHandler credentialHandler) { this.credentialHandler = credentialHandler; }
Example #10
Source File: LazyRealm.java From tomee with Apache License 2.0 | 4 votes |
@Override public CredentialHandler getCredentialHandler() { return credentialHandler; }
Example #11
Source File: LowTypedRealm.java From tomee with Apache License 2.0 | 4 votes |
@Override public CredentialHandler getCredentialHandler() { return null; }
Example #12
Source File: LowTypedRealm.java From tomee with Apache License 2.0 | 4 votes |
@Override public void setCredentialHandler(final CredentialHandler credentialHandler) { // no-op: ignored, impl should handle it }
Example #13
Source File: MyCdiLazyRealm.java From tomee with Apache License 2.0 | 4 votes |
@Override public CredentialHandler getCredentialHandler() { return null; }
Example #14
Source File: CredentialHandlerSF.java From Tomcat8-Source-Read with MIT License | 3 votes |
/** * Store the specified CredentialHandler properties and child (CredentialHandler) * * @param aWriter * PrintWriter to which we are storing * @param indent * Number of spaces to indent this element * @param aCredentialHandler * CredentialHandler whose properties are being stored * * @exception Exception * if an exception occurs while storing */ @Override public void storeChildren(PrintWriter aWriter, int indent, Object aCredentialHandler, StoreDescription parentDesc) throws Exception { if (aCredentialHandler instanceof NestedCredentialHandler) { NestedCredentialHandler nestedCredentialHandler = (NestedCredentialHandler) aCredentialHandler; // Store nested <CredentialHandler> element CredentialHandler[] credentialHandlers = nestedCredentialHandler.getCredentialHandlers(); storeElementArray(aWriter, indent, credentialHandlers); } }
Example #15
Source File: MyCdiLazyRealm.java From tomee with Apache License 2.0 | 2 votes |
@Override public void setCredentialHandler(final CredentialHandler credentialHandler) { }