-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCryptoMessage.java
More file actions
148 lines (128 loc) · 3.44 KB
/
Copy pathCryptoMessage.java
File metadata and controls
148 lines (128 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*
* Copyright (C) 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.oidc.msg;
import com.auth0.msg.KeyJar;
import java.util.List;
import java.util.Map;
/**
* Interface implemented by message classes supporting jwt handling.
*/
public interface CryptoMessage {
/**
* Set the allowed encryption key transport algorithm.
*
* @param encAlg
* the allowed encryption key transport algorithm
*/
public void setEncAlg(String encAlg);
/**
* get the allowed encryption key transport algorithm.
*
* @return the allowed encryption key transport algorithm
*/
public String getEncAlg();
/**
* Set the allowed encryption algorithm.
*
* @param encEnc
* the allowed encryption algorithm
*/
public void setEncEnc(String encEnc);
/**
* Get the allowed encryption algorithm.
*
* @return the allowed encryption algorithm
*/
public String getEncEnc();
/**
* Set the allowed signing algorithm.
*
* @param sigAlg
* the allowed id token signing algorithm
*/
public void setSigAlg(String sigAlg);
/**
* Get the allowed signing algorithm.
*
* @return the allowed id token signing algorithm
*/
public String getSigAlg();
/**
* Set map of allowed kids for issuer.
*
* @param noKidIssuers
* map of allowed kids for issuer
*/
public void setNoKidIssuers(Map<String, List<String>> noKidIssuers);
/**
* Get map of allowed kids for issuer.
*
* @return map of allowed kids for issuer
*/
public Map<String, List<String>> getNoKidIssuers();
/**
* Set whether to trust jku header.
*
* @param trustJku
* whether to trust jku header
*/
public void setTrustJku(boolean trustJku);
/**
* Get whether to trust jku header.
*
* @return whether to trust jku header
*/
public boolean getTrustJku();
/**
* Set whether to allow missing kid when searching jwt key for signing.
*
* @param allowMissingKid
* Whether to allow missing kid when searching jwt key for signing.
*/
public void setAllowMissingKid(boolean allowMissingKid);
/**
* Get whether to allow missing kid when searching jwt key for signing.
*
* @return Whether to allow missing kid when searching jwt key for signing.
*/
public boolean getAllowMissingKid();
/**
* Set Key Jar for JWT verification keys. If not set verification is not done.
*
* @param keyJar
* Key Jar for JWT verification keys.
*/
public void setKeyJar(KeyJar keyJar);
/**
* Get Key Jar for JWT verification keys. If not set verification is not done.
*
* @return Key Jar for JWT verification keys.
*/
public KeyJar getKeyJar();
/**
* Set Issuer of keys.
*
* @param issuer
* Issuer of keys.
*/
public void setIssuer(String issuer);
/**
* Get Issuer of keys.
*
* @return Issuer of keys.
*/
public String getIssuer();
}