Package alpine.model

Class ApiKey

java.lang.Object
alpine.model.ApiKey
All Implemented Interfaces:
Serializable, Principal

public class ApiKey extends Object implements Serializable, Principal
Persistable object representing an ApiKey.
Since:
1.0.0
Author:
Steve Springett
See Also:
  • Constructor Details

    • ApiKey

      public ApiKey()
  • Method Details

    • getId

      public long getId()
    • setId

      public void setId(long id)
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
    • getMaskedKey

      public String getMaskedKey()
      Masks all key characters except the prefix and last four characters with *. If the key does not have the currently configured prefix, do not return it.
      Returns:
      Masked key.
    • getName

      @Deprecated public String getName()
      Do not use - only here to satisfy Principal implementation requirement.
      Specified by:
      getName in interface Principal
      Returns:
      a String presentation of the username
    • getTeams

      public List<Team> getTeams()
    • setTeams

      public void setTeams(List<Team> teams)