summaryrefslogtreecommitdiffstats
blob: 634ce1131815c2f8384e2a359fa8e0992a0982ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * Copyright (c) 2010, Isode Limited, London, England.
 * All rights reserved.
 */
/*
 * Copyright (c) 2010, Remko Tronçon.
 * All rights reserved.
 */
package com.isode.stroke.sasl;

import com.isode.stroke.base.ByteArray;
import com.isode.stroke.base.SafeByteArray;

public class PLAINClientAuthenticator extends ClientAuthenticator {
    public PLAINClientAuthenticator() {
        super("PLAIN");
    }

    public SafeByteArray getResponse() {
        return new SafeByteArray().append(getAuthorizationID()).append((byte)0).append(getAuthenticationID()).append((byte)0).append(getPassword());
    }

    public boolean setChallenge(ByteArray challenge) {
        return true;
    }
}