mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-12-21 23:47:34 +02:00
Moved Authentication() test into AuthenticationService, and add test case to validate it operates correctly
This commit is contained in:
@@ -63,6 +63,15 @@ 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
|
||||
} else {
|
||||
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.)
|
||||
|
||||
Reference in New Issue
Block a user