congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SimpleUserPrincipal.setId
Code IndexAdd Tabnine to your IDE (free)

How to use
setId
method
in
leap.core.security.SimpleUserPrincipal

Best Java code snippets using leap.core.security.SimpleUserPrincipal.setId (Showing top 3 results out of 315)

origin: org.leapframework/leap-oauth2-webapp

@Override
public IdToken verifyIdToken(OAuth2Params params, String token) throws TokenVerifyException {
  MacSigner signer = new MacSigner(config.getClientSecret());
  Map<String, Object> claims = signer.verify(token);
  SimpleIdToken idToken = new SimpleIdToken(token);
  idToken.setClientId((String)claims.get(JWT.CLAIM_AUDIENCE));
  idToken.setUserId((String)claims.get(JWT.CLAIM_SUBJECT));
  SimpleUserPrincipal user = new SimpleUserPrincipal();
  user.setId(idToken.getUserId());
  user.setName((String)claims.remove("name"));
  user.setLoginName((String)claims.remove("login_name"));
  user.setProperties(claims);
  idToken.setUserInfo(user);
  idToken.setClaims(claims);
  return idToken;
}
origin: org.leapframework/leap-oauth2-webapp

protected UserPrincipal newUserInfo(JsonObject json) {
  SimpleUserPrincipal userInfo = new SimpleUserPrincipal();
  userInfo.setId(json.getString("sub"));
  userInfo.setName(json.getString("name"));
  userInfo.setLoginName(json.getString("login_name"));
  userInfo.setProperties(json.asMap());
  return userInfo;
}
origin: org.leapframework/leap-websecurity

principal.setId(jti);
principal.setLoginName(username);
principal.setName(username);
leap.core.securitySimpleUserPrincipalsetId

Popular methods of SimpleUserPrincipal

  • <init>
  • setLoginName
  • setName
  • setProperties

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Permission (java.security)
    Legacy security code; do not use.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now