Managing user-owned OAuth access tokens

    You can list your user-owned OAuth access tokens. Token names are not sensitive and cannot be used to log in.

    Procedure

    • List all user-owned OAuth access tokens:

      Example output

      1. <token1> openshift-challenging-client 2021-01-11T19:25:35Z 2021-01-12 19:25:35 +0000 UTC https://oauth-openshift.apps.example.com/oauth/token/implicit user:full
      2. <token2> openshift-browser-client 2021-01-11T19:27:06Z 2021-01-12 19:27:06 +0000 UTC https://oauth-openshift.apps.example.com/oauth/token/display user:full
      3. <token3> console 2021-01-11T19:26:29Z 2021-01-12 19:26:29 +0000 UTC https://console-openshift-console.apps.example.com/auth/callback user:full
    • Example output

      1. NAME CLIENT NAME CREATED EXPIRES REDIRECT URI SCOPES
      2. <token3> console 2021-01-11T19:26:29Z 2021-01-12 19:26:29 +0000 UTC https://console-openshift-console.apps.example.com/auth/callback user:full

    You can view the details of a user-owned OAuth access token.

    Procedure

    • Describe the details of a user-owned OAuth access token:

      1. Name: <token_name> (1)
      2. Namespace:
      3. Labels: <none>
      4. API Version: oauth.openshift.io/v1
      5. Authorize Token: sha256~Ksckkug-9Fg_RWn_AUysPoIg-_HqmFI9zUL_CgD8wr8
      6. Client Name: openshift-browser-client (2)
      7. Expires In: 86400 (3)
      8. Kind: UserOAuthAccessToken
      9. Metadata:
      10. Creation Timestamp: 2021-01-11T19:27:06Z
      11. Managed Fields:
      12. API Version: oauth.openshift.io/v1
      13. Fields Type: FieldsV1
      14. fieldsV1:
      15. f:authorizeToken:
      16. f:clientName:
      17. f:expiresIn:
      18. f:scopes:
      19. f:userName:
      20. Manager: oauth-server
      21. Operation: Update
      22. Time: 2021-01-11T19:27:06Z
      23. Resource Version: 30535
      24. Self Link: /apis/oauth.openshift.io/v1/useroauthaccesstokens/<token_name>
      25. UID: f9d00b67-ab65-489b-8080-e427fa3c6181
      26. Redirect URI: https://oauth-openshift.apps.example.com/oauth/token/display
      27. Scopes:
      28. user:full (5)
      29. User Name: <user_name> (6)
      30. User UID: 82356ab0-95f9-4fb3-9bc0-10f1d6a6a345
      31. Events: <none>

    The oc logout command only invalidates the OAuth token for the active session. You can use the following procedure to delete any user-owned OAuth tokens that are no longer needed.

    Deleting an OAuth access token logs out the user from all sessions that use the token.

    Procedure