Shibboleth supports federated (i.e. multiple Identity Provider, IdP) Single Sign-on (SSO) with SAML 2.0.
Shibboleth 2 supports SAML 2.0 and WS-Federation Passive (ADFS), but NOT OAuth 2.0 and OpenID 2.
Reference:
I'm dedicated agile security architect/system architect/developer with specialty of open source framework.
Shibboleth supports federated (i.e. multiple Identity Provider, IdP) Single Sign-on (SSO) with SAML 2.0.
Shibboleth 2 supports SAML 2.0 and WS-Federation Passive (ADFS), but NOT OAuth 2.0 and OpenID 2.
Reference:
"The default settings of the ui-router in AngularJS produces URLs like http://localhost/#/products/details/12345. Your Servlet gets a request for / and after a successful SAML authentication you are sent back to http://localhost/. The location hash #/products/details/12345 is lost during the authentication."
This is ok if you have a landing page, but not after session timeout.
"The solution was to enable the hmtl5mode in the $locationProvider and add a base tag to the HTML. When this feature is enabled, the URLs look like http://localhost/products/details/12345."
Reference: http://www.jasha.eu/blogposts/2015/10/saml-authentication-angularjs-spring-security.html
Also good links:
<login-config>
<auth-method>CLIENT-CERT</auth-method>
</login-config>
// Retrieve the certificate chain for this client
X509Certificate certs[] = request.getCertificateChain();
if ((certs == null) || (certs.length < 1)) {
if (getContainer().getLogger().isDebugEnabled())
getContainer().getLogger().debug(" No certificates included with this request");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
MESSAGES.missingRequestCertificate());
return (false);
}
public X509Certificate[] getCertificateChain() {
X509Certificate certs[] = (X509Certificate[]) getAttribute(Globals.CERTIFICATES_ATTR);
/**
* The request attribute under which we store the array of X509Certificate
* objects representing the certificate chain presented by our client,
* if any.
*/
public static final String CERTIFICATES_ATTR =
"javax.servlet.request.X509Certificate";
From http://askubuntu.com/questions/488823/google-chrome-not-starting.
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
java -Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel MyApp
Add the following line to the $JAVA_HOME/lib/swing.properties:
swing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
For details see https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html.
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
if (evt.getClickCount() == 2) {
Point point = evt.getPoint();
int row = table.rowAtPoint(point);
}
}
});
desktopPane.getDesktopManager().closeFrame(internalFrame);
For details see http://esus.com/programmatically-closing-a-jinternalframe/.
table.setAutoCreateRowSorter(true);
For details see http://www.codejava.net/java-se/swing/6-techniques-for-sorting-jtable-you-should-know.
"WebSocket is a protocol which allows for communication between the client and the server/endpoint using a single TCP connection. The advantage WebSocket has over HTTP is that the protocol is full-duplex (allows for simultaneous two-way communcation) and it’s header is much smaller than that of a HTTP header, allowing for more efficient communcation even over small packets of data."
Default Method in Java 8 is used for adding new methods in Interface without needing to altering implementing Classes.
Example: Original version
public interface Car {
public int getSpeed();
}
public class SportCar implements Car {
@Override
public int getSpeed() {
return 100;
}
}
Now we want to add new methods to interface, but if we did we also need to update implementing Classes. Instead of doing that we could use the new Default Method feature in Java 8
public interface Car {
public int getSpeed();
public default Color getColor() {
return Color.RED;
}
}
Stream is a new feature in Java 8 that brings a lot of operation for Collections. Here I will present the most important, but for a complete list see the Java API.
In the below examples I will use a List of Strings.
List<String> strings = Arrays.asList(new String[] { "Alf", "Bo", "Doo", "Core", "Adam", "Nisse" });
strings.stream().filter(s -> s.contains("o")).forEach(System.out::println);
The map() method converts each element into another object via the given function.
strings.stream().map(s -> s.toUpperCase()).forEach(System.out::println);
strings.stream().sorted((s1, s2) -> s1.compareTo(s2)).forEach(System.out::println);
Creates a new Collection.
List<String> result = strings.stream().sorted().collect(Collectors.toList());
Returns matched elements in Collections.
boolean anyMatch = strings.stream().anyMatch(s -> s.startsWith("A"));
System.out.println("anyMatch: " + anyMatch);
boolean allMatch = strings.stream().allMatch(s -> s.startsWith("A"));
System.out.println("allMatch: " + allMatch);
boolean noneMatch = strings.stream().noneMatch(s -> s.startsWith("A"));
System.out.println("noneMatch: " + noneMatch);
long noItems = strings.stream().count();
System.out.println("noItems: " + noItems);
Collaps the entire Collections to single element.
Optional<String> reduce = strings.stream().reduce((s1, s2) -> s1 + ", " + s2);
System.out.println("reduce: "+ reduce.get());
Lambda expression is used to replace one method classes/interface with inline code.
(arg1, arg2...) -> { body }
new Thread(() -> {
System.out.println("Hello from runnable.");
}).start();
List<String> s = Arrays.asList(new String[] { "foo", "bar", "code" });
Collections.sort(s, (String s1, String s2) -> {
return s1.compareTo(s2);
});
Collections.sort(s, (s1, s2) -> s1.compareTo(s2));
for (String i : s) {
System.out.println(i);
}
http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/Lambda-QuickStart/index.html