MCPcopy Create free account
hub / github.com/jwtk/jjwt / root

Method root

impl/src/main/java/io/jsonwebtoken/impl/security/KeysBridge.java:65–68  ·  view source on GitHub ↗

If the specified key is a KeySupplier, the 'root' (lowest level) key that may exist in a KeySupplier chain is returned, otherwise the key is returned. @param key the key to check if it is a KeySupplier @param the key type @return the lowest-level/root key

(K key)

Source from the content-addressed store, hash-verified

63 * @return the lowest-level/root key available.
64 */
65 @SuppressWarnings("unchecked")
66 public static <K extends Key> K root(K key) {
67 return (key instanceof KeySupplier<?>) ? (K) root((KeySupplier<?>) key) : key;
68 }
69
70 public static <K extends Key> K root(KeySupplier<K> supplier) {
71 Assert.notNull(supplier, "KeySupplier canot be null.");

Callers 2

applyMethod · 0.95
applyMethod · 0.95

Calls 2

notNullMethod · 0.95
getKeyMethod · 0.65

Tested by

no test coverage detected