keycloak
クラス | 公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken > クラステンプレート
org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken > の継承関係図
Inheritance graph
org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken > 連携図
Collaboration graph

クラス

interface  ProcessAuthenticateFlow
 
interface  ProcessBrokerFlow
 

公開メンバ関数

 ActionTokenContext (KeycloakSession session, RealmModel realm, UriInfo uriInfo, ClientConnection clientConnection, HttpRequest request, EventBuilder event, ActionTokenHandler< T > handler, String executionId, ProcessAuthenticateFlow processFlow, ProcessBrokerFlow processBrokerFlow)
 
EventBuilder getEvent ()
 
void setEvent (EventBuilder event)
 
KeycloakSession getSession ()
 
RealmModel getRealm ()
 
UriInfo getUriInfo ()
 
ClientConnection getClientConnection ()
 
HttpRequest getRequest ()
 
AuthenticationSessionModel createAuthenticationSessionForClient (String clientId) throws UriBuilderException, IllegalArgumentException
 
boolean isAuthenticationSessionFresh ()
 
AuthenticationSessionModel getAuthenticationSession ()
 
void setAuthenticationSession (AuthenticationSessionModel authenticationSession, boolean isFresh)
 
ActionTokenHandler< T > getHandler ()
 
String getExecutionId ()
 
void setExecutionId (String executionId)
 
Response processFlow (boolean action, String flowPath, AuthenticationFlowModel flow, String errorMessage, AuthenticationProcessor processor)
 
Response brokerFlow (String authSessionId, String code, String flowPath)
 

非公開変数類

final KeycloakSession session
 
final RealmModel realm
 
final UriInfo uriInfo
 
final ClientConnection clientConnection
 
final HttpRequest request
 
EventBuilder event
 
final ActionTokenHandler< T > handler
 
AuthenticationSessionModel authenticationSession
 
boolean authenticationSessionFresh
 
String executionId
 
final ProcessAuthenticateFlow processAuthenticateFlow
 
final ProcessBrokerFlow processBrokerFlow
 

詳解

著者
hmlnarik

構築子と解体子

◆ ActionTokenContext()

org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.ActionTokenContext ( KeycloakSession  session,
RealmModel  realm,
UriInfo  uriInfo,
ClientConnection  clientConnection,
HttpRequest  request,
EventBuilder  event,
ActionTokenHandler< T >  handler,
String  executionId,
ProcessAuthenticateFlow  processFlow,
ProcessBrokerFlow  processBrokerFlow 
)
inline
68  {
69  this.session = session;
70  this.realm = realm;
71  this.uriInfo = uriInfo;
72  this.clientConnection = clientConnection;
73  this.request = request;
74  this.event = event;
75  this.handler = handler;
76  this.executionId = executionId;
79  }
final ClientConnection clientConnection
Definition: ActionTokenContext.java:55
final HttpRequest request
Definition: ActionTokenContext.java:56
final ProcessBrokerFlow processBrokerFlow
Definition: ActionTokenContext.java:63
EventBuilder event
Definition: ActionTokenContext.java:57
String executionId
Definition: ActionTokenContext.java:61
final UriInfo uriInfo
Definition: ActionTokenContext.java:54
final ActionTokenHandler< T > handler
Definition: ActionTokenContext.java:58
final KeycloakSession session
Definition: ActionTokenContext.java:50
Response processFlow(boolean action, String flowPath, AuthenticationFlowModel flow, String errorMessage, AuthenticationProcessor processor)
Definition: ActionTokenContext.java:159
final ProcessAuthenticateFlow processAuthenticateFlow
Definition: ActionTokenContext.java:62
final RealmModel realm
Definition: ActionTokenContext.java:53

関数詳解

◆ brokerFlow()

Response org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.brokerFlow ( String  authSessionId,
String  code,
String  flowPath 
)
inline
163  {
165  return processBrokerFlow.brokerLoginFlow(authSessionId, code, getExecutionId(), client.getClientId(), authenticationSession.getTabId(), flowPath);
166  }
AuthenticationSessionModel authenticationSession
Definition: ActionTokenContext.java:59
final ProcessBrokerFlow processBrokerFlow
Definition: ActionTokenContext.java:63
Response brokerLoginFlow(String authSessionId, String code, String execution, String clientId, String tabId, String flowPath)
Definition: ClientModel.java:27
String getExecutionId()
Definition: ActionTokenContext.java:151

◆ createAuthenticationSessionForClient()

AuthenticationSessionModel org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.createAuthenticationSessionForClient ( String  clientId) throws UriBuilderException, IllegalArgumentException
inline
110  {
111  AuthenticationSessionModel authSession;
112 
113  // set up the account service as the endpoint to call.
114  ClientModel client = clientId != null ? realm.getClientByClientId(clientId) : SystemClientUtil.getSystemClient(realm);
115 
116  RootAuthenticationSessionModel rootAuthSession = new AuthenticationSessionManager(session).createAuthenticationSession(realm, true);
117  authSession = rootAuthSession.createAuthenticationSession(client);
118 
119  authSession.setAction(AuthenticationSessionModel.Action.AUTHENTICATE.name());
120  authSession.setProtocol(OIDCLoginProtocol.LOGIN_PROTOCOL);
121  String redirectUri = Urls.accountBase(uriInfo.getBaseUri()).path("/").build(realm.getName()).toString();
122  authSession.setRedirectUri(redirectUri);
123  authSession.setClientNote(OIDCLoginProtocol.REDIRECT_URI_PARAM, redirectUri);
124  authSession.setClientNote(OIDCLoginProtocol.RESPONSE_TYPE_PARAM, OAuth2Constants.CODE);
125  authSession.setClientNote(OIDCLoginProtocol.ISSUER, Urls.realmIssuer(uriInfo.getBaseUri(), realm.getName()));
126 
127  return authSession;
128  }
ClientModel getClientByClientId(String clientId)
Definition: OAuth2Constants.java:23
final UriInfo uriInfo
Definition: ActionTokenContext.java:54
final KeycloakSession session
Definition: ActionTokenContext.java:50
Definition: ClientModel.java:27
final RealmModel realm
Definition: ActionTokenContext.java:53
void setProtocol(String protocol)
String CODE
Definition: OAuth2Constants.java:25

◆ getAuthenticationSession()

134  {
135  return authenticationSession;
136  }
AuthenticationSessionModel authenticationSession
Definition: ActionTokenContext.java:59

◆ getClientConnection()

101  {
102  return clientConnection;
103  }
final ClientConnection clientConnection
Definition: ActionTokenContext.java:55

◆ getEvent()

81  {
82  return event;
83  }
EventBuilder event
Definition: ActionTokenContext.java:57

◆ getExecutionId()

String org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.getExecutionId ( )
inline
151  {
152  return executionId;
153  }
String executionId
Definition: ActionTokenContext.java:61

◆ getHandler()

147  {
148  return handler;
149  }
final ActionTokenHandler< T > handler
Definition: ActionTokenContext.java:58

◆ getRealm()

93  {
94  return realm;
95  }
final RealmModel realm
Definition: ActionTokenContext.java:53

◆ getRequest()

HttpRequest org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.getRequest ( )
inline
105  {
106  return request;
107  }
final HttpRequest request
Definition: ActionTokenContext.java:56

◆ getSession()

89  {
90  return session;
91  }
final KeycloakSession session
Definition: ActionTokenContext.java:50

◆ getUriInfo()

97  {
98  return uriInfo;
99  }
final UriInfo uriInfo
Definition: ActionTokenContext.java:54

◆ isAuthenticationSessionFresh()

boolean org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.isAuthenticationSessionFresh ( )
inline
130  {
132  }
boolean authenticationSessionFresh
Definition: ActionTokenContext.java:60

◆ processFlow()

Response org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.processFlow ( boolean  action,
String  flowPath,
AuthenticationFlowModel  flow,
String  errorMessage,
AuthenticationProcessor  processor 
)
inline
159  {
160  return processAuthenticateFlow.processFlow(action, getExecutionId(), getAuthenticationSession(), flowPath, flow, errorMessage, processor);
161  }
Response processFlow(boolean action, String execution, AuthenticationSessionModel authSession, String flowPath, AuthenticationFlowModel flow, String errorMessage, AuthenticationProcessor processor)
AuthenticationSessionModel getAuthenticationSession()
Definition: ActionTokenContext.java:134
final ProcessAuthenticateFlow processAuthenticateFlow
Definition: ActionTokenContext.java:62
String getExecutionId()
Definition: ActionTokenContext.java:151

◆ setAuthenticationSession()

void org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.setAuthenticationSession ( AuthenticationSessionModel  authenticationSession,
boolean  isFresh 
)
inline
138  {
140  this.authenticationSessionFresh = isFresh;
141  if (this.event != null) {
143  this.event.client((String) (client == null ? null : client.getClientId()));
144  }
145  }
AuthenticationSessionModel authenticationSession
Definition: ActionTokenContext.java:59
EventBuilder event
Definition: ActionTokenContext.java:57
boolean authenticationSessionFresh
Definition: ActionTokenContext.java:60
Definition: ClientModel.java:27

◆ setEvent()

85  {
86  this.event = event;
87  }
EventBuilder event
Definition: ActionTokenContext.java:57

◆ setExecutionId()

void org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.setExecutionId ( String  executionId)
inline
155  {
156  this.executionId = executionId;
157  }
String executionId
Definition: ActionTokenContext.java:61

メンバ詳解

◆ authenticationSession

◆ authenticationSessionFresh

boolean org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.authenticationSessionFresh
private

◆ clientConnection

◆ event

◆ executionId

◆ handler

◆ processAuthenticateFlow

◆ processBrokerFlow

◆ realm

◆ request

final HttpRequest org.keycloak.authentication.actiontoken.ActionTokenContext< T extends JsonWebToken >.request
private

◆ session

◆ uriInfo


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