mitreid-connect
公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder クラス
org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder の継承関係図
Inheritance graph
org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder 連携図
Collaboration graph

公開メンバ関数

String buildAuthRequestUrl (ServerConfiguration serverConfig, RegisteredClient clientConfig, String redirectUri, String nonce, String state, Map< String, String > options, String loginHint)
 
JWKSetCacheService getEncrypterService ()
 
void setEncrypterService (JWKSetCacheService encrypterService)
 
JWEAlgorithm getAlg ()
 
void setAlg (JWEAlgorithm alg)
 
EncryptionMethod getEnc ()
 
void setEnc (EncryptionMethod enc)
 

非公開変数類

JWKSetCacheService encrypterService
 
JWEAlgorithm alg
 
EncryptionMethod enc
 

詳解

著者
jricher

関数詳解

◆ buildAuthRequestUrl()

String org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.buildAuthRequestUrl ( ServerConfiguration  serverConfig,
RegisteredClient  clientConfig,
String  redirectUri,
String  nonce,
String  state,
Map< String, String >  options,
String  loginHint 
)
inline

org.mitre.openid.connect.client.service.AuthRequestUrlBuilderを実装しています。

59  {
60 
61  // create our signed JWT for the request object
62  JWTClaimsSet.Builder claims = new JWTClaimsSet.Builder();
63 
64  //set parameters to JwtClaims
65  claims.claim("response_type", "code");
66  claims.claim("client_id", clientConfig.getClientId());
67  claims.claim("scope", Joiner.on(" ").join(clientConfig.getScope()));
68 
69  // build our redirect URI
70  claims.claim("redirect_uri", redirectUri);
71 
72  // this comes back in the id token
73  claims.claim("nonce", nonce);
74 
75  // this comes back in the auth request return
76  claims.claim("state", state);
77 
78  // Optional parameters
79  for (Entry<String, String> option : options.entrySet()) {
80  claims.claim(option.getKey(), option.getValue());
81  }
82 
83  // if there's a login hint, send it
84  if (!Strings.isNullOrEmpty(loginHint)) {
85  claims.claim("login_hint", loginHint);
86  }
87 
88  EncryptedJWT jwt = new EncryptedJWT(new JWEHeader(alg, enc), claims.build());
89 
90  JWTEncryptionAndDecryptionService encryptor = encrypterService.getEncrypter(serverConfig.getJwksUri());
91 
92  encryptor.encryptJwt(jwt);
93 
94  try {
95  URIBuilder uriBuilder = new URIBuilder(serverConfig.getAuthorizationEndpointUri());
96  uriBuilder.addParameter("request", jwt.serialize());
97 
98  // build out the URI
99  return uriBuilder.build().toString();
100  } catch (URISyntaxException e) {
101  throw new AuthenticationServiceException("Malformed Authorization Endpoint Uri", e);
102  }
103  }
JWKSetCacheService encrypterService
Definition: EncryptedAuthRequestUrlBuilder.java:49
JWEAlgorithm alg
Definition: EncryptedAuthRequestUrlBuilder.java:51
EncryptionMethod enc
Definition: EncryptedAuthRequestUrlBuilder.java:52
JWTEncryptionAndDecryptionService getEncrypter(String jwksUri)
Definition: JWKSetCacheService.java:94

◆ getAlg()

JWEAlgorithm org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.getAlg ( )
inline
戻り値
the alg
122  {
123  return alg;
124  }
JWEAlgorithm alg
Definition: EncryptedAuthRequestUrlBuilder.java:51

◆ getEnc()

EncryptionMethod org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.getEnc ( )
inline
戻り値
the enc
136  {
137  return enc;
138  }
EncryptionMethod enc
Definition: EncryptedAuthRequestUrlBuilder.java:52

◆ getEncrypterService()

JWKSetCacheService org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.getEncrypterService ( )
inline
戻り値
the encrypterService
108  {
109  return encrypterService;
110  }
JWKSetCacheService encrypterService
Definition: EncryptedAuthRequestUrlBuilder.java:49

◆ setAlg()

void org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.setAlg ( JWEAlgorithm  alg)
inline
引数
algthe alg to set
129  {
130  this.alg = alg;
131  }
JWEAlgorithm alg
Definition: EncryptedAuthRequestUrlBuilder.java:51

◆ setEnc()

void org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.setEnc ( EncryptionMethod  enc)
inline
引数
encthe enc to set
143  {
144  this.enc = enc;
145  }
EncryptionMethod enc
Definition: EncryptedAuthRequestUrlBuilder.java:52

◆ setEncrypterService()

void org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.setEncrypterService ( JWKSetCacheService  encrypterService)
inline
引数
encrypterServicethe encrypterService to set
115  {
117  }
JWKSetCacheService encrypterService
Definition: EncryptedAuthRequestUrlBuilder.java:49

メンバ詳解

◆ alg

JWEAlgorithm org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.alg
private

◆ enc

EncryptionMethod org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.enc
private

◆ encrypterService

JWKSetCacheService org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder.encrypterService
private

このクラス詳解は次のファイルから抽出されました: