Tabnine Logo
SimpleUserPrincipal.setLoginName
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using leap.core.security.SimpleUserPrincipal.setLoginName (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

SimpleUserPrincipal principal = new SimpleUserPrincipal();
principal.setId(jti);
principal.setLoginName(username);
principal.setName(username);
principal.setProperties(claims);
leap.core.securitySimpleUserPrincipalsetLoginName

Popular methods of SimpleUserPrincipal

  • <init>
  • setId
  • setName
  • setProperties

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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