PageRenderTime 56ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/core/src/main/java/com/dtolabs/rundeck/core/authentication/Username.java

http://github.com/dtolabs/rundeck
Java | 50 lines | 18 code | 7 blank | 25 comment | 0 complexity | ef506d3f2ec59a7c5e8673a22f3947c1 MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. * Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com)
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /**
  17. *
  18. */
  19. package com.dtolabs.rundeck.core.authentication;
  20. import java.io.Serializable;
  21. import java.security.Principal;
  22. /**
  23. * @author noahcampbell
  24. *
  25. */
  26. public class Username implements Principal,Serializable {
  27. private static final long serialVersionUID = 1L;
  28. public Username(String username) {
  29. super();
  30. this.username = username;
  31. }
  32. private final String username;
  33. /**
  34. * @see java.security.Principal#getName()
  35. */
  36. public String getName() {
  37. return username;
  38. }
  39. @Override
  40. public String toString() {
  41. return "RUNDECK Username: " + this.username;
  42. }
  43. }