|
45 | 45 |
|
46 | 46 | (defprotocol CoerceToPrivateKey
|
47 | 47 | (->PrivateKey
|
48 |
| - ^PrivateKey [this] |
49 |
| - ^PrivateKey [this ^String algorithm] |
| 48 | + [this] |
| 49 | + [this ^String algorithm] |
50 | 50 | "Coerce something such as a base-64-encoded string or byte array to a `PrivateKey`. This isn't used directly by
|
51 | 51 | OpenSAML -- the key must be passed as part of an OpenSAML `Credential`. See `->Credential`."))
|
52 | 52 |
|
53 | 53 | (defprotocol CoerceToX509Certificate
|
54 |
| - (->X509Certificate ^X509Certificate [this] |
| 54 | + (^java.security.cert.X509Certificate ->X509Certificate [this] |
55 | 55 | "Coerce something such as a base-64-encoded string or byte array to a `java.security.cert.X509Certificate`. This
|
56 | 56 | class isn't used directly by OpenSAML; instead, certificate must be coerced to an OpenSAML `Credential`. See
|
57 | 57 | `->Credential`."))
|
58 | 58 |
|
59 | 59 | (defprotocol CoerceToCredential
|
60 | 60 | (->Credential
|
61 |
| - ^Credential [this] |
62 |
| - ^Credential [public-key private-key] |
| 61 | + [this] |
| 62 | + [public-key private-key] |
63 | 63 | "Coerce something such as a byte array or base-64-encoded String to an OpenSAML `Credential`. Typically, you'd use
|
64 | 64 | the credential with just the public key for the IdP's credentials, for encrypting requests (in combination with SP
|
65 | 65 | credentails) or verifying signature(s) in the response. A credential with both public and private keys would
|
66 | 66 | typically contain *your* public and private keys, for encrypting requests (in combination with IdP credentials) or
|
67 | 67 | for decrypting encrypted assertions in the response."))
|
68 | 68 |
|
69 | 69 | (defprotocol CoerceToElement
|
70 |
| - (->Element ^Element [this])) |
| 70 | + (^org.w3c.dom.Element ->Element [this])) |
71 | 71 |
|
72 | 72 | (defprotocol CoerceToSAMLObject
|
73 |
| - (->SAMLObject ^SignableSAMLObject [this])) |
| 73 | + (^org.opensaml.saml.common.SignableSAMLObject ->SAMLObject [this])) |
74 | 74 |
|
75 | 75 | (defprotocol CoerceToResponse
|
76 |
| - (->Response ^Response [this])) |
| 76 | + (^org.opensaml.saml.saml2.core.Response ->Response [this])) |
77 | 77 |
|
78 | 78 | (defprotocol SerializeXMLString
|
79 |
| - (->xml-string ^String [this])) |
| 79 | + (^String ->xml-string [this])) |
80 | 80 |
|
81 | 81 |
|
82 | 82 | ;;; ------------------------------------------------------ Impl ------------------------------------------------------
|
|
212 | 212 | (when-let [keystore (keystore m)]
|
213 | 213 | (KeyStoreX509CredentialAdapter. keystore key-alias (.toCharArray password)))))
|
214 | 214 | ([m private-key]
|
215 |
| - (let [credential (->Credential m) |
| 215 | + (let [credential ^Credential (->Credential m) |
216 | 216 | public-key (.getPublicKey credential)]
|
217 | 217 | (->Credential public-key private-key))))
|
218 | 218 |
|
|
0 commit comments