New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for External authentication method #64

Merged
merged 5 commits into from Jun 2, 2014

Conversation

Projects
None yet
3 participants
@roikku
Member

roikku commented May 30, 2014

A new authentication mechanism is proposed, in which the user can implement his/her own authenticate method.

Note: it is not fully tested yet(currently, it seems to authenticate properly, but the re-authentication using a real back-end has not been tested yet). (see next comment)

To use it, the method AuthenticationMethod.EXTERNAL must be selected, and an implementation of the interface AuthenticationMethod.AccessProvider must be provided.

public class MyAccessProvider implements AuthenticationMethod.AccessProvider{

    ...

    @Override
    public Access authenticate() {
        AccessBasic access = new AccessBasic();
        access.setToken(...);
        access.setUrl(...);
        return access ;
    }
}

It can be tested using this repository (and version 0.9.8-SNAPSHOT):

<repositories>  
    <repository>
        <id>joss-mvn-repo</id>
        <url>https://raw.github.com/roikku/joss/mvn-repo/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </repository>
</repositories>

@roikku roikku added the enhancement label May 30, 2014

@roikku roikku self-assigned this May 30, 2014

@buildhive

This comment has been minimized.

Show comment
Hide comment
@buildhive

buildhive May 30, 2014

Java Swift » joss #76 SUCCESS
This pull request looks good
(what's this?)

buildhive commented May 30, 2014

Java Swift » joss #76 SUCCESS
This pull request looks good
(what's this?)

@roikku

This comment has been minimized.

Show comment
Hide comment
@roikku

roikku May 31, 2014

Member

I have now conducted quite extensive tests using a real backend (which relies on an OAuth2 mechanism). Initial authentication and subsequent re-authentications seem just fine. So far this new authentication method appears to be robust.

Member

roikku commented May 31, 2014

I have now conducted quite extensive tests using a real backend (which relies on an OAuth2 mechanism). Initial authentication and subsequent re-authentications seem just fine. So far this new authentication method appears to be robust.

roikku added a commit that referenced this pull request Jun 2, 2014

Merge pull request #64 from roikku/master
Added support for External authentication method

@roikku roikku merged commit 0f960ec into javaswift:master Jun 2, 2014

@robert-bor robert-bor added this to the 0.9.8 milestone Jun 8, 2014

roikku added a commit to roikku/swift-explorer that referenced this pull request Jun 8, 2014

katta pushed a commit to twxkit/joss that referenced this pull request Oct 6, 2014

Merge pull request #64 from roikku/master
Added support for External authentication method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment