keycloak-service
公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.forms.account.freemarker.model.TotpBean クラス
org.keycloak.forms.account.freemarker.model.TotpBean 連携図
Collaboration graph

公開メンバ関数

 TotpBean (KeycloakSession session, RealmModel realm, UserModel user, UriBuilder uriBuilder)
 
boolean isEnabled ()
 
String getTotpSecret ()
 
String getTotpSecretEncoded ()
 
String getTotpSecretQrCode ()
 
String getManualUrl ()
 
String getQrUrl ()
 
OTPPolicy getPolicy ()
 

非公開変数類

final RealmModel realm
 
final String totpSecret
 
final String totpSecretEncoded
 
final String totpSecretQrCode
 
final boolean enabled
 
final UriBuilder uriBuilder
 

詳解

著者
Stian Thorgersen

構築子と解体子

◆ TotpBean()

org.keycloak.forms.account.freemarker.model.TotpBean.TotpBean ( KeycloakSession  session,
RealmModel  realm,
UserModel  user,
UriBuilder  uriBuilder 
)
inline
42  {
43  this.uriBuilder = uriBuilder;
44  this.enabled = session.userCredentialManager().isConfiguredFor(realm, user, realm.getOTPPolicy().getType());
45 
46  this.realm = realm;
47  this.totpSecret = HmacOTP.generateSecret(20);
48  this.totpSecretEncoded = TotpUtils.encode(totpSecret);
49  this.totpSecretQrCode = TotpUtils.qrCode(totpSecret, realm, user);
50  }
final String totpSecretQrCode
Definition: TotpBean.java:38
final UriBuilder uriBuilder
Definition: TotpBean.java:40
final String totpSecret
Definition: TotpBean.java:36
final boolean enabled
Definition: TotpBean.java:39
final String totpSecretEncoded
Definition: TotpBean.java:37
final RealmModel realm
Definition: TotpBean.java:35

関数詳解

◆ getManualUrl()

String org.keycloak.forms.account.freemarker.model.TotpBean.getManualUrl ( )
inline
68  {
69  return uriBuilder.replaceQueryParam("mode", "manual").build().toString();
70  }
final UriBuilder uriBuilder
Definition: TotpBean.java:40

◆ getPolicy()

OTPPolicy org.keycloak.forms.account.freemarker.model.TotpBean.getPolicy ( )
inline
76  {
77  return realm.getOTPPolicy();
78  }
final RealmModel realm
Definition: TotpBean.java:35

◆ getQrUrl()

String org.keycloak.forms.account.freemarker.model.TotpBean.getQrUrl ( )
inline
72  {
73  return uriBuilder.replaceQueryParam("mode", "qr").build().toString();
74  }
final UriBuilder uriBuilder
Definition: TotpBean.java:40

◆ getTotpSecret()

String org.keycloak.forms.account.freemarker.model.TotpBean.getTotpSecret ( )
inline
56  {
57  return totpSecret;
58  }
final String totpSecret
Definition: TotpBean.java:36

◆ getTotpSecretEncoded()

String org.keycloak.forms.account.freemarker.model.TotpBean.getTotpSecretEncoded ( )
inline
60  {
61  return totpSecretEncoded;
62  }
final String totpSecretEncoded
Definition: TotpBean.java:37

◆ getTotpSecretQrCode()

String org.keycloak.forms.account.freemarker.model.TotpBean.getTotpSecretQrCode ( )
inline
64  {
65  return totpSecretQrCode;
66  }
final String totpSecretQrCode
Definition: TotpBean.java:38

◆ isEnabled()

boolean org.keycloak.forms.account.freemarker.model.TotpBean.isEnabled ( )
inline
52  {
53  return enabled;
54  }
final boolean enabled
Definition: TotpBean.java:39

メンバ詳解

◆ enabled

final boolean org.keycloak.forms.account.freemarker.model.TotpBean.enabled
private

◆ realm

final RealmModel org.keycloak.forms.account.freemarker.model.TotpBean.realm
private

◆ totpSecret

final String org.keycloak.forms.account.freemarker.model.TotpBean.totpSecret
private

◆ totpSecretEncoded

final String org.keycloak.forms.account.freemarker.model.TotpBean.totpSecretEncoded
private

◆ totpSecretQrCode

final String org.keycloak.forms.account.freemarker.model.TotpBean.totpSecretQrCode
private

◆ uriBuilder

final UriBuilder org.keycloak.forms.account.freemarker.model.TotpBean.uriBuilder
private

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