1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-03-21 21:07:03 +02:00

get Authenticated reports session from main repository

This commit is contained in:
Evgen Kostenko 2016-06-01 15:52:52 +03:00
parent 3b2cee5d9b
commit be2f16214f

View File

@ -69,6 +69,14 @@ func (s *AuthenticationService) AcquireSessionCookie(username, password string)
return true, nil
}
// Authenticated reports if the current Client has an authenticated session with JIRA
func (s *AuthenticationService) Authenticated() bool {
if s != nil {
return s.client.session != nil
}
return false
}
// TODO Missing API Call GET (Returns information about the currently authenticated user's session)
// See https://docs.atlassian.com/jira/REST/latest/#auth/1/session
// TODO Missing API Call DELETE (Logs the current user out of JIRA, destroying the existing session, if any.)