Class UserPrincipal

java.lang.Object
org.codeability.sharing.plugins.api.UserPrincipal

public class UserPrincipal extends Object
data to identify or authorize a user.
Author:
Michael Breu
  • Constructor Details

    • UserPrincipal

      public UserPrincipal(String name, String gitLabAccessToken)
      creates a user principal to be used in context of this api
      Parameters:
      name - the user name. Just for information
      gitLabAccessToken - the gitlab access token
    • UserPrincipal

      public UserPrincipal()
      empty constructor for JSON.
  • Method Details

    • getName

      public String getName()
      Returns:
      an informative name of the user
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getGitLabAccessToken

      public String getGitLabAccessToken()
      Returns:
      the oAuth2 access token of the current user. This may be used to load permissions.
    • setGitLabAccessToken

      public void setGitLabAccessToken(String gitLabAccessToken)
      Parameters:
      gitLabAccessToken - the gitLabAccessToken to set