Package org.keycloak.services.managers
Class Auth
- java.lang.Object
-
- org.keycloak.services.managers.Auth
-
public class Auth extends Object
- Author:
- Stian Thorgersen
-
-
Constructor Summary
Constructors Constructor Description Auth(RealmModel realm, AccessToken token, UserModel user, ClientModel client, UserSessionModel session, boolean cookie)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientModel
getClient()
AuthenticatedClientSessionModel
getClientSession()
RealmModel
getRealm()
UserSessionModel
getSession()
AccessToken
getToken()
UserModel
getUser()
boolean
hasClientRole(ClientModel app, String role)
boolean
hasOneOfAppRole(ClientModel app, String... roles)
boolean
hasOneOfRealmRole(String... roles)
boolean
hasRealmRole(String role)
boolean
isCookieAuthenticated()
void
require(String role)
void
requireOneOf(String... roles)
void
setClientSession(AuthenticatedClientSessionModel clientSession)
-
-
-
Constructor Detail
-
Auth
public Auth(RealmModel realm, AccessToken token, UserModel user, ClientModel client, UserSessionModel session, boolean cookie)
-
-
Method Detail
-
isCookieAuthenticated
public boolean isCookieAuthenticated()
-
getRealm
public RealmModel getRealm()
-
getUser
public UserModel getUser()
-
getClient
public ClientModel getClient()
-
getToken
public AccessToken getToken()
-
getSession
public UserSessionModel getSession()
-
getClientSession
public AuthenticatedClientSessionModel getClientSession()
-
setClientSession
public void setClientSession(AuthenticatedClientSessionModel clientSession)
-
require
public void require(String role)
-
requireOneOf
public void requireOneOf(String... roles)
-
hasRealmRole
public boolean hasRealmRole(String role)
-
hasOneOfRealmRole
public boolean hasOneOfRealmRole(String... roles)
-
hasClientRole
public boolean hasClientRole(ClientModel app, String role)
-
hasOneOfAppRole
public boolean hasOneOfAppRole(ClientModel app, String... roles)
-
-