Class SingleKeyJWSKeySelector<C extends SecurityContext>

    • Constructor Detail

      • SingleKeyJWSKeySelector

        public SingleKeyJWSKeySelector​(JWSAlgorithm expectedJWSAlg,
                                       Key key)
        Creates a new single-key JWS key selector.
        Parameters:
        expectedJWSAlg - The expected JWS algorithm for the JWS objects to be verified. Must not be null.
        key - The key to always return. Must not be null.
    • Method Detail

      • selectJWSKeys

        public List<? extends KeyselectJWSKeys​(JWSHeader header,
                                                 C context)
        Description copied from interface: JWSKeySelector
        Selects key candidates for verifying a JWS object.
        Specified by:
        selectJWSKeys in interface JWSKeySelector<C extends SecurityContext>
        Parameters:
        header - The header of the JWS object. Must not be null.
        context - Optional context of the JWS object, null if not required.
        Returns:
        The key candidates in trial order, empty list if none.