Skip to content

Commit bfa950b

Browse files
committed
Add Javadoc for OAuth
1 parent 4d2d1c8 commit bfa950b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

src/main/java/com/rabbitmq/client/amqp/OAuthSettings.java

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,61 @@ public interface OAuthSettings<T> {
6868
*/
6969
OAuthSettings<T> grantType(String grantType);
7070

71+
/**
72+
* Set a parameter to pass in the request.
73+
*
74+
* <p>The OAuth 2 server may require extra parameters to narrow down the identity of the user.
75+
*
76+
* @param name name of the parameter
77+
* @param value value of the parameter
78+
* @return OAuth settings
79+
*/
7180
OAuthSettings<T> parameter(String name, String value);
7281

82+
/**
83+
* Whether to share the same token between connections.
84+
*
85+
* <p>Default is <true>true</true> (the token is shared between connections).
86+
*
87+
* @param shared flag to share the token between connections
88+
* @return OAuth settings
89+
*/
7390
OAuthSettings<T> shared(boolean shared);
7491

92+
/**
93+
* TLS configuration for requesting the token.
94+
*
95+
* @return TLS configuration
96+
*/
7597
TlsSettings<? extends T> tls();
7698

99+
/**
100+
* Connection settings.
101+
*
102+
* @return connections settings
103+
*/
77104
T connection();
78105

106+
/**
107+
* TLS settings to request the OAuth 2 token.
108+
*
109+
* @param <T> the type of object returned by methods, usually the object itself
110+
*/
79111
interface TlsSettings<T> {
80112

113+
/**
114+
* {@link SSLContext} for HTTPS requests.
115+
*
116+
* @param sslContext the SSL context
117+
* @return TLS settings
118+
*/
81119
TlsSettings<T> sslContext(SSLContext sslContext);
82120

121+
/**
122+
* Go back to the general OAuth 2 settings.
123+
*
124+
* @return OAuth settings
125+
*/
83126
OAuthSettings<T> oauth();
84127
}
85128
}

0 commit comments

Comments
 (0)